backup with fully working version, only one texture renders

This commit is contained in:
JakeBreath
2026-08-04 17:49:14 -05:00
parent 8c17c273fe
commit ec74c092b7
61 changed files with 49377 additions and 1117 deletions
+31 -7
View File
@@ -50,6 +50,26 @@ _LAYER_KEYWORDS = (
'_fur', '_shell', '_crackiness',
)
# Entities whose base skin is one of several fur/colour variants. The preview
# picks one at random so the model matches the variety the pack shows in-game.
VARIANTS = {
'wolf': [
'wolf/wolf.png', 'wolf/wolf_ashen.png', 'wolf/wolf_black.png',
'wolf/wolf_chestnut.png', 'wolf/wolf_rusty.png', 'wolf/wolf_snowy.png',
'wolf/wolf_spotted.png', 'wolf/wolf_striped.png', 'wolf/wolf_woods.png',
],
'fox': ['fox/fox.png', 'fox/snow_fox.png'],
'cat': [
'cat/tabby.png', 'cat/black.png', 'cat/red.png', 'cat/siamese.png',
'cat/british_shorthair.png', 'cat/calico.png', 'cat/persian.png',
'cat/ragdoll.png', 'cat/white.png', 'cat/jellie.png', 'cat/all_black.png',
],
'cow': [
'cow/temperate_cow.png', 'cow/cold_cow.png', 'cow/warm_cow.png',
'cow/red_mooshroom.png', 'cow/brown_mooshroom.png',
],
}
def _base_candidates(entity):
"""Return (entity, [candidate relative paths]) in priority order."""
@@ -77,7 +97,7 @@ def _base_candidates(entity):
def refresh_vanilla_index():
"""Rebuild the entity → base-skin map from the extracted vanilla set."""
"""Rebuild the entity → {default, variants} skin map from the vanilla set."""
root = os.path.join(settings.MEDIA_ROOT, 'vanilla', ENTITY_ROOT)
if not os.path.isdir(root):
raise FileNotFoundError(f'{root} missing — extract vanilla entity textures first')
@@ -87,19 +107,23 @@ def refresh_vanilla_index():
rel = os.path.join(root, entry)
if entry.endswith('.png'):
entity = entry[:-4]
if not index.get(entity):
index[entity] = entry
index.setdefault(entity, {'default': entry, 'variants': [entry]})
continue
if not os.path.isdir(rel):
continue
entity = entry
_, candidates = _base_candidates(entity)
if candidates and not index.get(entity):
index[entity] = candidates[0]
if candidates and entity not in index:
index[entity] = {'default': candidates[0], 'variants': [candidates[0]]}
for entity, rel in ALIASES.items():
if not index.get(entity):
index[entity] = rel
if entity not in index:
index[entity] = {'default': rel, 'variants': [rel]}
for entity, variants in VARIANTS.items():
if entity in index and variants:
index[entity]['default'] = variants[0]
index[entity]['variants'] = variants
out = os.path.join(settings.MEDIA_ROOT, 'vanilla', INDEX_NAME)
with open(out, 'w') as f:
+61
View File
@@ -3268,3 +3268,64 @@ a.deletelink {
color: var(--md-sys-color-on-error-container, #7f1d1d);
font-size: 0.68rem;
}
/* Full-screen Blockbench preview overlay */
.bb-overlay {
position: fixed;
inset: 0;
z-index: 5000;
background: #121418;
display: flex;
flex-direction: column;
}
.bb-overlay[hidden] { display: none; }
.bb-overlay-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.5rem 1rem;
background: #1a1d24;
color: #e6e6e6;
border-bottom: 1px solid #2a2e38;
flex: 0 0 auto;
}
.bb-overlay-title {
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.bb-overlay-close {
background: none;
border: none;
color: #e6e6e6;
font-size: 1.25rem;
cursor: pointer;
padding: 0.25rem 0.6rem;
border-radius: 6px;
}
.bb-overlay-close:hover { background: #2a2e38; }
.bb-overlay-status {
position: absolute;
top: 3.1rem;
left: 50%;
transform: translateX(-50%);
z-index: 10;
padding: 0.35rem 0.9rem;
border-radius: 999px;
background: rgba(0, 0, 0, 0.65);
color: #fff;
font-size: 0.8rem;
pointer-events: none;
max-width: 80%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.bb-frame {
flex: 1 1 auto;
width: 100%;
border: none;
background: #121418;
}
-291
View File
@@ -1,291 +0,0 @@
// Pure geometry math for GeckoLib/Blockbench geo.json models.
// No Three.js dependency — shared by model_viewer.js (browser) and unit tests (Node).
//
// Transforms follow the GeckoLib convention: each bone contributes
// local = T(pivot) · R(bone.rotation) · T(pivot)
// and cubes are authored in model space (origin at feet, Y up).
// `build()` flattens the bone tree into world-space cubes, avoiding the
// nested-pivot double-counting that broke naive group-based renderers.
(function (global, factory) {
if (typeof module !== 'undefined' && module.exports) {
module.exports = factory();
} else {
global.GeoBuilder = factory();
}
})(typeof self !== 'undefined' ? self : this, function () {
'use strict';
var DEG = Math.PI / 180;
// ---------- minimal 4x4 matrix helpers (column-major, Three.js order) ----------
function identity() {
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
}
function multiply(a, b) {
var out = new Array(16);
for (var c = 0; c < 4; c++) {
for (var r = 0; r < 4; r++) {
out[c * 4 + r] =
a[0 * 4 + r] * b[c * 4 + 0] +
a[1 * 4 + r] * b[c * 4 + 1] +
a[2 * 4 + r] * b[c * 4 + 2] +
a[3 * 4 + r] * b[c * 4 + 3];
}
}
return out;
}
function translation(x, y, z) {
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 1];
}
function rotationXYZ(rx, ry, rz) {
var cx = Math.cos(rx), sx = Math.sin(rx);
var cy = Math.cos(ry), sy = Math.sin(ry);
var cz = Math.cos(rz), sz = Math.sin(rz);
// R = Rz * Ry * Rx (matches Three.js Euler 'XYZ' default order)
var r = identity();
r[0] = cy * cz;
r[1] = cy * sz;
r[2] = -sy;
r[4] = sx * sy * cz - cx * sz;
r[5] = sx * sy * sz + cx * cz;
r[6] = sx * cy;
r[8] = cx * sy * cz + sx * sz;
r[9] = cx * sy * sz - sx * cz;
r[10] = cx * cy;
return r;
}
function transformPoint(m, p) {
var x = p[0], y = p[1], z = p[2];
var w = m[3] * x + m[7] * y + m[11] * z + m[15];
return [
(m[0] * x + m[4] * y + m[8] * z + m[12]) / w,
(m[1] * x + m[5] * y + m[9] * z + m[13]) / w,
(m[2] * x + m[6] * y + m[10] * z + m[14]) / w,
];
}
// ---------- box UV ----------
// Minecraft "box UV" face rects (u, v, w, h) in texture pixels.
function boxUVRects(uv, size) {
var u = uv[0], v = uv[1];
var x = size[0], y = size[1], z = size[2];
return {
top: [u + z, v, x, z],
bottom: [u + z + x, v, x, z],
north: [u + z, v + z, x, y],
south: [u + z + x, v + z, x, y],
east: [u, v + z, z, y],
west: [u + z + x + z, v + z, z, y],
};
}
// Blockbench per-face UV: {north:{uv:[u,v], uv_size:[w,h]}, ...} with
// up/down for top/bottom. Negative uv_size mirrors that face (180° flip).
function perFaceRects(uv) {
var map = { top: 'up', bottom: 'down', north: 'north', south: 'south', east: 'east', west: 'west' };
var rects = {};
for (var face in map) {
var p = uv[map[face]];
if (!p || !Array.isArray(p.uv)) {
rects[face] = [0, 0, 0, 0];
continue;
}
var w = (p.uv_size && p.uv_size[0]) || 0;
var h = (p.uv_size && p.uv_size[1]) || 0;
rects[face] = [p.uv[0], p.uv[1], w, h];
}
return rects;
}
// Build one cube as a BufferGeometry-compatible mesh:
// 24 positions (6 faces x 4 corners), 24 UVs, 36 indices, outward winding.
function cubeGeometry(size, uv, tw, th) {
var hx = size[0] / 2, hy = size[1] / 2, hz = size[2] / 2;
var rects = Array.isArray(uv) ? boxUVRects(uv, size) : perFaceRects(uv);
var order = ['east', 'west', 'top', 'bottom', 'south', 'north'];
var outward = {
east: [1, 0, 0], west: [-1, 0, 0],
top: [0, 1, 0], bottom: [0, -1, 0],
south: [0, 0, 1], north: [0, 0, -1],
};
var positions = [];
var uvs = [];
var indices = [];
var v = 0;
function pushFace(face, corners) {
var a = corners[0], b = corners[1], c = corners[2];
var abx = b[0] - a[0], aby = b[1] - a[1], abz = b[2] - a[2];
var acx = c[0] - a[0], acy = c[1] - a[1], acz = c[2] - a[2];
var nx = aby * acz - abz * acy;
var ny = abz * acx - abx * acz;
var nz = abx * acy - aby * acx;
var out = outward[face];
if (nx * out[0] + ny * out[1] + nz * out[2] < 0) {
var tmp = corners[1];
corners[1] = corners[2];
corners[2] = tmp;
}
for (var i = 0; i < 4; i++) {
var cor = corners[i];
positions.push(cor[0], cor[1], cor[2]);
uvs.push(cor[3], cor[4]);
}
indices.push(v, v + 1, v + 2, v, v + 2, v + 3);
v += 4;
}
for (var i = 0; i < order.length; i++) {
var face = order[i];
var rect = rects[face];
var u0 = rect[0] / tw, u1 = (rect[0] + rect[2]) / tw;
var vTop = 1 - (rect[1] + rect[3]) / th;
var vBot = 1 - rect[1] / th;
var cs;
if (face === 'east') {
cs = [
[hx, hy, -hz, u1, vTop], [hx, hy, hz, u0, vTop],
[hx, -hy, hz, u0, vBot], [hx, -hy, -hz, u1, vBot],
];
} else if (face === 'west') {
cs = [
[-hx, hy, hz, u1, vTop], [-hx, hy, -hz, u0, vTop],
[-hx, -hy, -hz, u0, vBot], [-hx, -hy, hz, u1, vBot],
];
} else if (face === 'top') {
cs = [
[-hx, hy, hz, u0, vTop], [hx, hy, hz, u1, vTop],
[hx, hy, -hz, u1, vBot], [-hx, hy, -hz, u0, vBot],
];
} else if (face === 'bottom') {
cs = [
[-hx, -hy, -hz, u0, vTop], [hx, -hy, -hz, u1, vTop],
[hx, -hy, hz, u1, vBot], [-hx, -hy, hz, u0, vBot],
];
} else if (face === 'south') {
cs = [
[hx, hy, hz, u0, vTop], [-hx, hy, hz, u1, vTop],
[-hx, -hy, hz, u1, vBot], [hx, -hy, hz, u0, vBot],
];
} else { // north
cs = [
[-hx, hy, -hz, u0, vTop], [hx, hy, -hz, u1, vTop],
[hx, -hy, -hz, u1, vBot], [-hx, -hy, -hz, u0, vBot],
];
}
pushFace(face, cs);
}
return { positions: positions, uvs: uvs, indices: indices };
}
// ---------- model build ----------
// Resource locations like "needsofnature:textures/entity/x.png" resolve to
// the zip member "assets/needsofnature/textures/entity/x.png".
function resourceToMember(resource) {
resource = String(resource);
if (resource.indexOf(':') !== -1) {
var p = resource.split(':');
return 'assets/' + p.shift() + '/' + p.join(':');
}
if (resource.indexOf('assets/') === 0) return resource;
return 'assets/' + resource;
}
// Returns { cubes: [{matrix, size, uv, texture}], texture_width, texture_height }
function build(geo) {
var geometry = ((geo['minecraft:geometry'] || [])[0]) || null;
if (!geometry) return { cubes: [], texture_width: 64, texture_height: 64 };
var tw = (geometry.description && geometry.description.texture_width) || 64;
var th = (geometry.description && geometry.description.texture_height) || 64;
var textures = {};
for (var k in (geo['afw_bone_textures'] || {})) {
textures[k] = resourceToMember(geo['afw_bone_textures'][k]);
}
var defaultTex = null;
for (var k in textures) { defaultTex = textures[k]; break; }
var bones = {};
(geometry.bones || []).forEach(function (b) { bones[b.name] = b; });
var cubes = [];
function walk(name, parentMatrix) {
var bone = bones[name];
if (!bone) return;
var pivot = bone.pivot || [0, 0, 0];
// Bedrock/GeckoLib rotations are opposite the Three.js default
// direction, so negate the Euler angles (identity models unaffected).
var rot = (bone.rotation || [0, 0, 0]).map(function (d) { return -d * DEG; });
var local = multiply(
translation(pivot[0], pivot[1], pivot[2]),
multiply(
rotationXYZ(rot[0], rot[1], rot[2]),
translation(-pivot[0], -pivot[1], -pivot[2])
)
);
var world = multiply(parentMatrix, local);
var tex = textures[name] || defaultTex;
(bone.cubes || []).forEach(function (c) {
var origin = c.origin || [0, 0, 0];
var size = c.size || [1, 1, 1];
var cRot = (c.rotation || [0, 0, 0]).map(function (d) { return -d * DEG; });
var hasRot = !!(c.rotation && (c.rotation[0] || c.rotation[1] || c.rotation[2]));
// Blockbench cubes rotate around their own pivot (fall back to origin).
var cPivot = hasRot ? (c.pivot || origin) : origin;
var center = [
origin[0] + size[0] / 2,
origin[1] + size[1] / 2,
origin[2] + size[2] / 2,
];
var cubeWorld = multiply(
world,
multiply(
translation(cPivot[0], cPivot[1], cPivot[2]),
multiply(
rotationXYZ(cRot[0], cRot[1], cRot[2]),
multiply(
translation(-cPivot[0], -cPivot[1], -cPivot[2]),
translation(center[0], center[1], center[2])
)
)
)
);
cubes.push({
matrix: cubeWorld,
size: size,
uv: c.uv || [0, 0],
texture: tex,
});
});
for (var child in bones) {
if (bones[child].parent === name) walk(child, world);
}
}
for (var root in bones) {
if (!bones[root].parent) walk(root, identity());
}
return { cubes: cubes, texture_width: tw, texture_height: th };
}
return {
build: build,
cubeGeometry: cubeGeometry,
boxUVRects: boxUVRects,
perFaceRects: perFaceRects,
resourceToMember: resourceToMember,
transformPoint: transformPoint,
identity: identity,
translation: translation,
rotationXYZ: rotationXYZ,
multiply: multiply,
};
});
-254
View File
@@ -1,254 +0,0 @@
// GeoJSON model viewer for the Models/Textures tab. Uses the shared GeoBuilder
// geometry math (bone transforms + box/per-face UV) and renders world-space
// cubes with Three.js. Textures are served through the gated pack_asset and
// vanilla_asset endpoints, resolved per cube:
// 1. afw_bone_textures (pack member), composited over the vanilla entity
// skin when one exists (NoN `*_features` overlays sit on the vanilla base)
// 2. the model's default pack skin (server-matched)
// 3. the bundled vanilla entity skin
// 4. gray
(function () {
let renderer = null;
let scene = null;
let camera = null;
let meshRoot = null;
let rafId = null;
const textureLoader = new THREE.TextureLoader();
const materialCache = {};
let vanillaIndex = null;
let vanillaIndexPromise = null;
function assetUrl(baseUrl, member) {
return baseUrl.replace('ASSET', member);
}
function entityNameFromMember(member) {
let base = member.slice(member.lastIndexOf('/') + 1);
if (base.endsWith('.geo.json')) base = base.slice(0, -'.geo.json'.length);
for (const suffix of ['.mf', '.fm', '.m', '.f', '.g']) {
if (base.endsWith(suffix)) { base = base.slice(0, -suffix.length); break; }
}
return base;
}
function buildGeometry(size, uv, tw, th) {
const g = GeoBuilder.cubeGeometry(size, uv, tw, th);
const geometry = new THREE.BufferGeometry();
geometry.setAttribute('position', new THREE.Float32BufferAttribute(g.positions, 3));
geometry.setAttribute('uv', new THREE.Float32BufferAttribute(g.uvs, 2));
geometry.setIndex(g.indices);
geometry.computeVertexNormals();
return geometry;
}
function fetchVanillaIndex(opts) {
if (vanillaIndexPromise) return vanillaIndexPromise;
if (!opts.vanillaBaseUrl) {
vanillaIndexPromise = Promise.resolve({});
} else {
vanillaIndexPromise = fetch(assetUrl(opts.vanillaBaseUrl, 'entity_index.json'))
.then(r => r.ok ? r.json() : {})
.catch(() => ({}));
}
return vanillaIndexPromise;
}
function vanillaSkinUrl(opts, index, entity) {
const rel = (index && index[entity]) || null;
return rel ? assetUrl(opts.vanillaBaseUrl, 'entity/' + rel) : null;
}
// desc: { url, vanillaUrl } — url is the pack/overlay member, vanillaUrl the
// base skin to composite it over (when available).
function resolveTexture(cube, entity, opts, index) {
if (cube.texture) {
return {
url: assetUrl(opts.baseUrl, cube.texture),
vanillaUrl: vanillaSkinUrl(opts, index, entity),
};
}
if (opts.defaultTexture) {
return { url: assetUrl(opts.baseUrl, opts.defaultTexture), vanillaUrl: null };
}
const rel = (index && index[entity]) || null;
if (rel) {
return { url: null, vanillaUrl: vanillaSkinUrl(opts, index, entity) };
}
return null;
}
function loadImage(url) {
return new Promise((resolve, reject) => {
const img = new Image();
img.crossOrigin = 'anonymous';
img.onload = () => resolve(img);
img.onerror = () => reject(new Error('img'));
img.src = url;
});
}
async function prepareMaterial(desc, tw, th) {
const key = (desc.url || '') + '|' + (desc.vanillaUrl || '');
if (materialCache[key]) return materialCache[key];
let texture = null;
if (desc.url && desc.vanillaUrl) {
try {
const [overlay, base] = await Promise.all([loadImage(desc.url), loadImage(desc.vanillaUrl)]);
const canvas = document.createElement('canvas');
canvas.width = tw;
canvas.height = th;
const ctx = canvas.getContext('2d');
ctx.drawImage(base, 0, 0, tw, th);
ctx.drawImage(overlay, 0, 0, tw, th);
texture = new THREE.CanvasTexture(canvas);
} catch (e) {
texture = null;
}
}
const singleUrl = texture ? null : (desc.url || desc.vanillaUrl);
if (singleUrl) texture = textureLoader.load(singleUrl);
let material;
if (texture) {
texture.wrapS = THREE.ClampToEdgeWrapping;
texture.wrapT = THREE.ClampToEdgeWrapping;
material = new THREE.MeshStandardMaterial({ map: texture, roughness: 0.9, metalness: 0.0 });
if (singleUrl) {
textureLoader.load(singleUrl, undefined, undefined, () => {
if (material.map) material.map.dispose();
material.map = null;
material.color.setHex(0x9a9a9a);
material.needsUpdate = true;
});
}
} else {
material = new THREE.MeshStandardMaterial({ color: 0x9a9a9a, roughness: 0.9 });
}
materialCache[key] = material;
return material;
}
function disposeObject(obj) {
obj.traverse((node) => {
if (node.geometry) node.geometry.dispose();
});
for (const key in materialCache) {
if (materialCache[key].map) materialCache[key].map.dispose();
materialCache[key].dispose();
}
for (const key in materialCache) delete materialCache[key];
}
function render(member, container, opts) {
if (renderer) dispose();
const width = container.clientWidth || 480;
const height = container.clientHeight || 480;
scene = new THREE.Scene();
scene.background = new THREE.Color(0x1e1e2e);
camera = new THREE.PerspectiveCamera(50, width / height, 0.1, 2000);
camera.position.set(0, 20, 60);
camera.lookAt(0, 12, 0);
renderer = new THREE.WebGLRenderer({ antialias: true, preserveDrawingBuffer: true });
renderer.setSize(width, height);
renderer.setPixelRatio(window.devicePixelRatio || 1);
container.appendChild(renderer.domElement);
scene.add(new THREE.AmbientLight(0xffffff, 0.6));
const key = new THREE.DirectionalLight(0xffffff, 0.9);
key.position.set(30, 60, 30);
scene.add(key);
const fill = new THREE.DirectionalLight(0xffffff, 0.3);
fill.position.set(-30, 20, -30);
scene.add(fill);
meshRoot = new THREE.Group();
scene.add(meshRoot);
const entity = entityNameFromMember(member);
fetch(assetUrl(opts.baseUrl, member), { headers: { 'Accept': 'application/json' } })
.then(r => { if (!r.ok) throw new Error('http'); return r.json(); })
.then(geo => Promise.all([geo, fetchVanillaIndex(opts)]))
.then(([geo, index]) => {
const built = GeoBuilder.build(geo);
if (!built.cubes.length) throw new Error('no cubes');
const tw = built.texture_width, th = built.texture_height;
const jobs = built.cubes.map((cube) => {
const desc = resolveTexture(cube, entity, opts, index);
return desc ? prepareMaterial(desc, tw, th) : Promise.resolve(null);
});
return Promise.all(jobs).then((materials) => ({ built, materials }));
})
.then(({ built, materials }) => {
for (let i = 0; i < built.cubes.length; i++) {
const cube = built.cubes[i];
const geometry = buildGeometry(cube.size, cube.uv, built.texture_width, built.texture_height);
let material = materials[i];
if (!material) {
material = new THREE.MeshStandardMaterial({ color: 0x9a9a9a, roughness: 0.9 });
}
const mesh = new THREE.Mesh(geometry, material);
mesh.matrix = new THREE.Matrix4().fromArray(cube.matrix);
mesh.matrixAutoUpdate = false;
meshRoot.add(mesh);
}
const box = new THREE.Box3().setFromObject(meshRoot);
const center = box.getCenter(new THREE.Vector3());
const size = box.getSize(new THREE.Vector3());
const radius = Math.max(size.x, size.y, size.z) / 2 || 10;
meshRoot.position.sub(center);
camera.position.set(radius * 2.2, radius * 1.6, radius * 2.6);
camera.near = radius / 10;
camera.far = radius * 40;
camera.updateProjectionMatrix();
camera.lookAt(0, 0, 0);
})
.catch(() => {
container.innerHTML = '<p class="empty-hint">Could not load this model.</p>';
});
let isDragging = false;
let lastX = 0, lastY = 0;
renderer.domElement.addEventListener('mousedown', (e) => {
isDragging = true; lastX = e.clientX; lastY = e.clientY;
});
window.addEventListener('mouseup', () => { isDragging = false; });
window.addEventListener('mousemove', (e) => {
if (!isDragging || !meshRoot) return;
const dx = e.clientX - lastX, dy = e.clientY - lastY;
lastX = e.clientX; lastY = e.clientY;
meshRoot.rotation.y += dx * 0.01;
meshRoot.rotation.x += dy * 0.01;
});
renderer.domElement.addEventListener('wheel', (e) => {
e.preventDefault();
camera.position.multiplyScalar(e.deltaY > 0 ? 1.06 : 0.94);
}, { passive: false });
function animate() {
rafId = requestAnimationFrame(animate);
renderer.render(scene, camera);
}
animate();
}
function dispose() {
if (rafId) { cancelAnimationFrame(rafId); rafId = null; }
if (renderer) {
if (meshRoot) disposeObject(meshRoot);
renderer.dispose();
if (renderer.domElement && renderer.domElement.parentNode) {
renderer.domElement.parentNode.removeChild(renderer.domElement);
}
}
renderer = null;
scene = null;
camera = null;
meshRoot = null;
}
window.PacksModelViewer = { render: render, dispose: dispose };
})();
+226
View File
@@ -0,0 +1,226 @@
// packs_preview.js — opens a model in the vendored Blockbench app inside a
// full-screen overlay. The geo JSON is loaded via the gated pack_asset
// endpoint and the texture images are resolved from afw_bone_textures (or the
// vanilla entity skin fallback) and handed to Blockbench; the bundled
// GeckoLib + Multi Actor Animator plugins handle applying them.
(function () {
let overlay = null;
let iframe = null;
let busy = false;
const BB_URL = '/static/vendor/blockbench/index.html';
function ensureOverlay() {
if (overlay) return overlay;
overlay = document.createElement('div');
overlay.className = 'bb-overlay';
overlay.innerHTML =
'<div class="bb-overlay-header">' +
'<span class="bb-overlay-title" id="bb-overlay-title"></span>' +
'<button type="button" class="bb-overlay-close" id="bb-overlay-close" aria-label="Close"><i class="fas fa-times"></i></button>' +
'</div>' +
'<div class="bb-overlay-status" id="bb-overlay-status"></div>';
overlay.addEventListener('click', (e) => { if (e.target === overlay) close(); });
overlay.querySelector('#bb-overlay-close').addEventListener('click', close);
document.body.appendChild(overlay);
return overlay;
}
function setStatus(text) {
const el = document.querySelector('#bb-overlay-status');
if (el) el.textContent = text || '';
}
function close() {
if (!overlay) return;
overlay.hidden = true;
if (iframe) { iframe.remove(); iframe = null; }
}
function assetUrl(baseUrl, member) {
return baseUrl.replace('ASSET', member);
}
function entityNameFromMember(member) {
let base = member.slice(member.lastIndexOf('/') + 1);
if (base.endsWith('.geo.json')) base = base.slice(0, -'.geo.json'.length);
for (const s of ['.mf', '.fm', '.m', '.f', '.g']) {
if (base.endsWith(s)) { base = base.slice(0, -s.length); break; }
}
return base;
}
function resourceToMember(resource) {
resource = String(resource);
if (resource.indexOf(':') !== -1) {
const p = resource.split(':');
return 'assets/' + p.shift() + '/' + p.join(':');
}
if (resource.startsWith('assets/')) return resource;
return 'assets/' + resource;
}
function loadImage(url) {
return new Promise((resolve, reject) => {
const img = new Image();
img.onload = () => resolve(img);
img.onerror = () => reject(new Error('Could not load ' + url));
img.src = url;
});
}
function imageDataUrl(img) {
const c = document.createElement('canvas');
c.width = img.naturalWidth;
c.height = img.naturalHeight;
c.getContext('2d').drawImage(img, 0, 0);
return c.toDataURL('image/png');
}
async function fetchGeo(member, baseUrl) {
const r = await fetch(assetUrl(baseUrl, member), { headers: { 'Accept': 'application/json' } });
if (!r.ok) throw new Error('Could not load the model file');
return r.json();
}
async function fetchVanillaIndex(vanillaBaseUrl) {
try {
const r = await fetch(assetUrl(vanillaBaseUrl, 'entity_index.json'));
return r.ok ? await r.json() : {};
} catch (e) {
return {};
}
}
// Resolve the textures to hand to Blockbench: the pack's <entity>_features
// overlay(s) plus the vanilla entity skin (a random fur/colour variant when
// the mob has several). Blockbench + the bundled plugins UV-wrap and apply
// them, so we don't worry about per-bone assignment here.
async function resolveTextures(geo, entity, opts, index) {
const textures = [];
const afw = geo['afw_bone_textures'] || {};
// 1. Feature overlays — from afw_bone_textures, or the conventional
// assets/<ns>/textures/entity/<entity>/<entity>_features.png path.
const members = [];
let namespace = 'needsofnature';
for (const k in afw) {
const m = resourceToMember(afw[k]);
if (members.indexOf(m) === -1) members.push(m);
const colon = String(afw[k]).indexOf(':');
if (colon > 0) namespace = String(afw[k]).slice(0, colon);
}
if (!members.length && entity) {
members.push('assets/' + namespace + '/textures/entity/' + entity + '/' + entity + '_features.png');
}
for (const m of members) {
try {
const img = await loadImage(assetUrl(opts.baseUrl, m));
textures.push({ name: m.split('/').pop(), dataUrl: imageDataUrl(img) });
} catch (e) {
console.warn('packs: skip feature texture', m, e);
}
}
// 2. Vanilla skin — a random variant when several exist, else the
// server-matched pack skin, else none.
let rel = null;
const ent = index && index[entity];
if (ent) {
const variants = ent.variants || (typeof ent === 'string' ? [ent] : [ent.default]);
if (variants && variants.length) rel = variants[Math.floor(Math.random() * variants.length)];
}
if (rel) {
try {
const img = await loadImage(assetUrl(opts.vanillaBaseUrl, 'entity/' + rel));
textures.push({ name: rel.split('/').pop(), dataUrl: imageDataUrl(img) });
} catch (e) {
console.warn('packs: skip vanilla skin', e);
}
} else if (opts.defaultTexture) {
try {
const img = await loadImage(assetUrl(opts.baseUrl, opts.defaultTexture));
textures.push({ name: opts.defaultTexture.split('/').pop(), dataUrl: imageDataUrl(img) });
} catch (e) {
console.warn('packs: skip default texture', e);
}
}
return textures;
}
async function open(btn) {
const member = btn.dataset.member;
const name = btn.dataset.name || member;
const opts = { baseUrl: btn.dataset.baseUrl, vanillaBaseUrl: btn.dataset.vanillaBaseUrl, defaultTexture: btn.dataset.defaultTexture || null };
if (!member || !opts.baseUrl || busy) return;
busy = true;
const overlayEl = ensureOverlay();
overlayEl.hidden = false;
document.querySelector('#bb-overlay-title').textContent = name;
setStatus('Starting Blockbench…');
if (iframe) iframe.remove();
iframe = document.createElement('iframe');
iframe.className = 'bb-frame';
iframe.src = BB_URL;
overlayEl.appendChild(iframe);
const ready = await new Promise((resolve) => {
let done = false;
const finish = (ok) => {
if (done) return;
done = true;
window.removeEventListener('message', onMsg);
clearTimeout(timer);
resolve(ok);
};
const timer = setTimeout(() => finish(false), 45000);
const onMsg = (e) => {
if (e.origin !== window.location.origin) return;
if (e.data && e.data.type === 'packs-bb-ready') finish(true);
};
window.addEventListener('message', onMsg);
});
if (!ready) {
setStatus('Blockbench failed to start.');
busy = false;
return;
}
setStatus('Loading model…');
try {
const [geo, index] = await Promise.all([
fetchGeo(member, opts.baseUrl),
fetchVanillaIndex(opts.vanillaBaseUrl),
]);
const entity = entityNameFromMember(member);
const textures = await resolveTextures(geo, entity, opts, index);
iframe.contentWindow.postMessage({
type: 'packs-open-model',
geo: geo,
name: name,
textures: textures,
}, window.location.origin);
setStatus('Applying textures…');
} catch (e) {
setStatus('Could not load model: ' + e.message);
}
busy = false;
}
window.addEventListener('message', (e) => {
if (e.origin !== window.location.origin) return;
if (!e.data) return;
if (e.data.type === 'packs-model-open') {
setStatus('Ready — drag to orbit, scroll to zoom.');
} else if (e.data.type === 'packs-model-error') {
setStatus('Model error: ' + (e.data.error || ''));
} else if (e.data.type === 'packs-plugin-error') {
setStatus('Plugin error: ' + (e.data.error || ''));
}
});
window.PacksPreview = { open: open, close: close };
})();
File diff suppressed because one or more lines are too long
-172
View File
@@ -1,172 +0,0 @@
{
"afw_bone_textures": {
"cylinder": "needsofnature:textures/entity/wolf/wolf_features.png",
"bulb": "needsofnature:textures/entity/wolf/wolf_features.png"
},
"format_version": "1.12.0",
"minecraft:geometry": [
{
"description": {
"identifier": "geometry.unknown",
"texture_width": 64,
"texture_height": 32,
"visible_bounds_width": 3,
"visible_bounds_height": 2.5,
"visible_bounds_offset": [0, 0.75, 0]
},
"bones": [
{
"name": "root",
"pivot": [0, 0, 0]
},
{
"name": "wolf",
"parent": "root",
"pivot": [-1, 10.5, -7]
},
{
"name": "frontbody",
"parent": "wolf",
"pivot": [-1, 10.5, -7]
},
{
"name": "head",
"parent": "frontbody",
"pivot": [-1, 10.5, -7],
"cubes": [
{"origin": [-4, 7.5, -9], "size": [6, 6, 4], "uv": [0, 0]},
{"origin": [-4, 13.5, -7], "size": [2, 2, 1], "uv": [16, 14]},
{"origin": [0, 13.5, -7], "size": [2, 2, 1], "uv": [16, 14]},
{"origin": [-2.5, 7.51563, -12], "size": [3, 3, 4], "uv": [0, 10]}
]
},
{
"name": "mane",
"parent": "frontbody",
"pivot": [-1, 10, 2],
"rotation": [90, 0, 0],
"cubes": [
{"origin": [-5, 12, -1], "size": [8, 6, 7], "uv": [21, 0]}
]
},
{
"name": "leg3",
"parent": "frontbody",
"pivot": [-2.5, 8, -4],
"cubes": [
{"origin": [-3.5, 0, -5], "size": [2, 8, 2], "uv": [0, 18]}
]
},
{
"name": "leg4",
"parent": "frontbody",
"pivot": [0.5, 8, -4],
"cubes": [
{"origin": [-0.5, 0, -5], "size": [2, 8, 2], "uv": [0, 18]}
]
},
{
"name": "body",
"parent": "frontbody",
"pivot": [0, 10, 2],
"rotation": [90, 0, 0],
"cubes": [
{"origin": [-4, 3, -1], "size": [6, 9, 6], "uv": [18, 14]}
]
},
{
"name": "d",
"parent": "body",
"pivot": [-1, 5, -0.2],
"rotation": [30.36119, -40.78947, -20.94102],
"cubes": [
{"origin": [-2, 4, -1.2], "size": [2, 3, 2], "uv": [20, 22]}
]
},
{
"name": "cylinder",
"parent": "d",
"pivot": [-1.48996, 6.28701, -0.48996],
"cubes": [
{
"origin": [-1.98996, 6.28701, -1.18996],
"size": [1, 5, 1],
"inflate": -0.1,
"uv": {
"north": {"uv": [52, 9], "uv_size": [3, 15]},
"east": {"uv": [49, 9], "uv_size": [3, 15]},
"south": {"uv": [58, 9], "uv_size": [3, 15]},
"west": {"uv": [55, 9], "uv_size": [3, 15]},
"up": {"uv": [52, 6], "uv_size": [3, 3]},
"down": {"uv": [55, 9], "uv_size": [3, -3]}
}
},
{
"origin": [-2.08996, 10.68701, -1.28996],
"size": [1, 1, 1],
"inflate": -0.3,
"uv": {
"north": {"uv": [54, 4], "uv_size": [2, 2]},
"east": {"uv": [52, 4], "uv_size": [2, 2]},
"south": {"uv": [58, 4], "uv_size": [2, 2]},
"west": {"uv": [56, 4], "uv_size": [2, 2]},
"up": {"uv": [54, 2], "uv_size": [2, 2]},
"down": {"uv": [56, 4], "uv_size": [2, -2]}
}
}
]
},
{
"name": "bulb",
"parent": "cylinder",
"pivot": [-1.51197, 8.36355, -0.68726],
"rotation": [0, -47.5, 0],
"cubes": [
{
"origin": [-2.26197, 7.86355, -1.73726],
"size": [1.25, 1, 2.1],
"uv": {
"north": {"uv": [52, 28], "uv_size": [3, 2]},
"east": {"uv": [48, 28], "uv_size": [4, 2]},
"south": {"uv": [59, 28], "uv_size": [3, 2]},
"west": {"uv": [55, 28], "uv_size": [4, 2]},
"up": {"uv": [52, 24], "uv_size": [3, 4]},
"down": {"uv": [55, 28], "uv_size": [3, -4]}
}
}
]
},
{
"name": "backbody",
"parent": "wolf",
"pivot": [0, 10, 2]
},
{
"name": "leg1",
"parent": "backbody",
"pivot": [-2.5, 8, 7],
"cubes": [
{"origin": [-3.5, 0, 6], "size": [2, 8, 2], "uv": [0, 18]}
]
},
{
"name": "leg2",
"parent": "backbody",
"pivot": [0.5, 8, 7],
"cubes": [
{"origin": [-0.5, 0, 6], "size": [2, 8, 2], "uv": [0, 18]}
]
},
{
"name": "tail",
"parent": "backbody",
"pivot": [-1, 12, 8],
"rotation": [55, 0, 0],
"cubes": [
{"origin": [-2, 4, 7], "size": [2, 8, 2], "uv": [9, 18]}
]
}
]
}
]
}
-113
View File
@@ -1,113 +0,0 @@
{
"format_version": "1.12.0",
"afw_bone_textures": {
"body": "needsofnature:textures/entity/zombie/zombie.png",
"leftleg": "needsofnature:textures/entity/zombie/zombie.png",
"rightleg": "needsofnature:textures/entity/zombie/zombie.png",
"d": "needsofnature:textures/entity/zombie/zombie.png"
},
"minecraft:geometry": [
{
"description": {
"identifier": "geometry.unknown",
"texture_width": 64,
"texture_height": 64,
"visible_bounds_width": 2,
"visible_bounds_height": 3.5,
"visible_bounds_offset": [0, 1.25, 0]
},
"bones": [
{
"name": "root",
"pivot": [0, 0, 0]
},
{
"name": "zombie",
"parent": "root",
"pivot": [0, 0, 0]
},
{
"name": "waist",
"parent": "zombie",
"pivot": [0, 12, 0]
},
{
"name": "head",
"parent": "waist",
"pivot": [0, 24, 0],
"cubes": [
{"origin": [-4, 24, -4], "size": [8, 8, 8], "uv": [0, 0]}
]
},
{
"name": "headwear",
"parent": "waist",
"pivot": [0, 24, 0],
"cubes": [
{"origin": [-4, 24, -4], "size": [8, 8, 8], "inflate": 0.5, "uv": [32, 0]}
]
},
{
"name": "body",
"parent": "waist",
"pivot": [0, 24, 0],
"cubes": [
{"origin": [-4, 12, -2], "size": [8, 12, 4], "uv": [16, 16]}
]
},
{
"name": "d",
"parent": "body",
"pivot": [0, 12, 0],
"cubes": [
{"origin": [-1, 10.75, -6], "size": [2, 2, 5], "inflate": -0.3, "uv": [17, 8]}
]
},
{
"name": "leftarm",
"parent": "waist",
"pivot": [5, 22, 0],
"mirror": true,
"cubes": [
{"origin": [4, 12, -2], "size": [4, 12, 4], "uv": [40, 16]}
]
},
{
"name": "propleft",
"parent": "leftarm",
"pivot": [6, 12, 0]
},
{
"name": "rightarm",
"parent": "waist",
"pivot": [-5, 22, 0],
"cubes": [
{"origin": [-8, 12, -2], "size": [4, 12, 4], "uv": [40, 16]}
]
},
{
"name": "propright",
"parent": "rightarm",
"pivot": [-6, 12, 0]
},
{
"name": "leftleg",
"parent": "zombie",
"pivot": [1.9, 12, 0],
"mirror": true,
"cubes": [
{"origin": [0, 0, -2], "size": [4, 12, 4], "uv": [0, 16]}
]
},
{
"name": "rightleg",
"parent": "zombie",
"pivot": [-1.9, 12, 0],
"cubes": [
{"origin": [-4, 0, -2], "size": [4, 12, 4], "uv": [0, 16]}
]
}
]
}
]
}
@@ -1,234 +0,0 @@
// Unit tests for geo_builder.js — run with: node static/js/tests/geo_builder.test.js
// No framework: asserts, prints a summary, exits non-zero on failure.
'use strict';
const path = require('path');
const GeoBuilder = require(path.join(__dirname, '..', 'geo_builder.js'));
const zombie = require(path.join(__dirname, 'fixtures', 'zombie.geo.json'));
let failures = 0;
let checks = 0;
function approx(a, b, tol = 1e-6) {
return Math.abs(a - b) <= tol;
}
function assertVec(actual, expected, label, tol = 1e-6) {
checks++;
const ok = approx(actual[0], expected[0], tol) && approx(actual[1], expected[1], tol) && approx(actual[2], expected[2], tol);
if (!ok) {
failures++;
console.error(`FAIL ${label}: got [${actual.map(v => v.toFixed(4)).join(', ')}] expected [${expected.join(', ')}]`);
}
}
function assert(cond, label) {
checks++;
if (!cond) { failures++; console.error(`FAIL ${label}`); }
}
function worldCenter(matrix) {
return GeoBuilder.transformPoint(matrix, [0, 0, 0]);
}
// ---------- 1. Real zombie model (nested hierarchy, identity rotations) ----------
const built = GeoBuilder.build(zombie);
const tw = built.texture_width, th = built.texture_height;
assert(built.cubes.length === 8, `zombie cube count (got ${built.cubes.length})`);
const centers = built.cubes.map(c => ({ c, center: worldCenter(c.matrix) }));
function cubeNear(center) {
return centers.filter(({ center: c }) =>
approx(c[0], center[0], 1e-6) && approx(c[1], center[1], 1e-6) && approx(c[2], center[2], 1e-6)
).map(x => x.c);
}
assert(cubeNear([0, 28, 0]).length >= 2, 'head + headwear at (0,28,0)'); // head & headwear
assert(cubeNear([0, 18, 0]).length === 1, 'body at (0,18,0)');
assert(cubeNear([6, 18, 0]).length === 1, 'leftarm at (6,18,0)');
assert(cubeNear([-6, 18, 0]).length === 1, 'rightarm at (-6,18,0)');
assert(cubeNear([2, 6, 0]).length === 1, 'leftleg at (2,6,0)');
assert(cubeNear([-2, 6, 0]).length === 1, 'rightleg at (-2,6,0)');
assert(cubeNear([0, 11.75, -3.5]).length === 1, 'd at (0,11.75,-3.5)');
// Head = the (0,28,0) cube with uv [0,0]; headwear has uv [32,0].
const headCube = cubeNear([0, 28, 0]).find(c => c.uv[0] === 0 && c.uv[1] === 0);
assert(!!headCube, 'head cube identified');
if (headCube) {
// Head north face (last face) must sample the vanilla (8..16, 8..16) region.
const geo = GeoBuilder.cubeGeometry(headCube.size, headCube.uv, tw, th);
const northStart = 5 * 8; // face order: east,west,top,bottom,south,north
let minU = 2, maxU = -1, minV = 2, maxV = -1;
for (let i = 0; i < 8; i += 2) {
minU = Math.min(minU, geo.uvs[northStart + i]);
maxU = Math.max(maxU, geo.uvs[northStart + i]);
minV = Math.min(minV, geo.uvs[northStart + i + 1]);
maxV = Math.max(maxV, geo.uvs[northStart + i + 1]);
}
assert(approx(minU, 8 / 64) && approx(maxU, 16 / 64), `head north U in (8..16)/64 (got ${minU.toFixed(3)}..${maxU.toFixed(3)})`);
assert(approx(minV, 1 - 16 / 64) && approx(maxV, 1 - 8 / 64), `head north V in [0.75,0.875] (got ${minV.toFixed(3)}..${maxV.toFixed(3)})`);
}
// All UVs within [0,1].
let allInRange = true;
for (const { c } of centers) {
const g = GeoBuilder.cubeGeometry(c.size, c.uv, tw, th);
for (const u of g.uvs) if (u < 0 || u > 1) { allInRange = false; break; }
}
assert(allInRange, 'all UVs within [0,1]');
// Unmapped bones default to the pack's main texture (resource location
// converted to the zip member path).
assert(headCube.texture === 'assets/needsofnature/textures/entity/zombie/zombie.png', 'head uses default texture');
assert(GeoBuilder.resourceToMember('needsofnature:textures/entity/zombie/zombie.png') === 'assets/needsofnature/textures/entity/zombie/zombie.png', 'resource location converted to member');
assert(GeoBuilder.resourceToMember('assets/needsofnature/textures/x.png') === 'assets/needsofnature/textures/x.png', 'already-member unchanged');
assert(GeoBuilder.resourceToMember('textures/plain.png') === 'assets/textures/plain.png', 'bare path prefixed');
// ---------- 2. Synthetic rotated bone: Rz(-90°) around pivot (0,10,0) ----------
// Rotations are negated to match the Bedrock/GeckoLib direction.
const rotated = {
'minecraft:geometry': [{
description: { identifier: 'geometry.t', texture_width: 64, texture_height: 64 },
bones: [{
name: 'waist', pivot: [0, 10, 0], rotation: [0, 0, 90],
cubes: [{ origin: [0, 10, 0], size: [2, 2, 2], uv: [0, 0] }],
}],
}],
};
const rotBuilt = GeoBuilder.build(rotated);
assert(rotBuilt.cubes.length === 1, 'rotated model has one cube');
// cube center = origin + size/2 = (1,11,1); Rz(-90) around pivot (0,10,0):
// rel (1,1,1) -> (1,-1,1) -> +pivot = (1,9,1)
const rotCenter = worldCenter(rotBuilt.cubes[0].matrix);
assertVec(rotCenter, [1, 9, 1], 'rotated cube center around pivot (expect (1,9,1))');
// ---------- 3. Nested pivot with rotation ----------
const nested = {
'minecraft:geometry': [{
description: { identifier: 'geometry.n', texture_width: 64, texture_height: 64 },
bones: [
{ name: 'root', pivot: [0, 0, 0] },
{ name: 'waist', pivot: [0, 12, 0], parent: 'root', rotation: [0, 0, 0] },
{ name: 'head', pivot: [0, 24, 0], parent: 'waist',
cubes: [{ origin: [-4, 24, -4], size: [8, 8, 8], uv: [0, 0] }] },
],
}],
};
const nestedBuilt = GeoBuilder.build(nested);
assertVec(worldCenter(nestedBuilt.cubes[0].matrix), [0, 28, 0], 'nested pivot head center (expect (0,28,0))');
// ---------- 4. Real wolf model: rotated bones must produce a quadruped layout ----------
const wolf = require(path.join(__dirname, 'fixtures', 'wolf.geo.json'));
const wolfBuilt = GeoBuilder.build(wolf);
const wolfCenters = wolfBuilt.cubes.map(c => ({ c, center: worldCenter(c.matrix) }));
const wBody = wolfCenters.find(({ c }) => c.size[0] === 8 && c.size[1] === 6 && c.size[2] === 7);
assert(!!wBody, 'wolf body cube found');
if (wBody) {
// Body high (y~10.5) and in the front half (z<2). Under the old rotation
// sign the body landed at the back (z=7) — this catches the regression.
assertVec(wBody.center, [-1, 10.5, -3], 'wolf body center (expect (-1,10.5,-3))');
}
const wHead = wolfCenters.find(({ c }) => c.size[0] === 6 && c.size[1] === 6 && c.size[2] === 4);
assert(!!wHead, 'wolf head cube found');
if (wHead) {
assertVec(wHead.center, [-1, 10.5, -7], 'wolf head center (expect (-1,10.5,-7))');
}
// 4 legs (size 2x8x2 cubes whose y is near the ground).
const wLegs = wolfCenters.filter(({ c, center }) => c.size[0] === 2 && c.size[1] === 8 && c.size[2] === 2 && center[1] < 6);
assert(wLegs.length === 4, `wolf has 4 legs near the ground (got ${wLegs.length})`);
wLegs.forEach(({ center }) => assert(approx(center[1], 4.0, 0.2), `leg at ground level y=${center[1].toFixed(1)}`));
// Tail: the cube with the largest |z|, behind the body.
let wTail = wolfCenters[0];
for (const w of wolfCenters) {
if (Math.abs(w.center[2]) > Math.abs(wTail.center[2])) wTail = w;
}
assert(wTail.center[2] > 8, `wolf tail behind body (z=${wTail.center[2].toFixed(1)})`);
assert(wBody && wTail.center[2] > wBody.center[2], 'tail z > body z');
// ---------- 5. Real polar bear: cube-level pivot + rotation ----------
// The polar bear's rear torso cube has its own pivot/rotation; rotating around
// the cube origin (not its pivot) sent it flying to z≈48. Regression test.
const polar = require(path.join(__dirname, 'fixtures', 'polar_bear.geo.json'));
const polarBuilt = GeoBuilder.build(polar);
const polarCubes = polarBuilt.cubes.map(c => ({ c, center: worldCenter(c.matrix) }));
const pRear = polarCubes.find(({ c }) => c.size[0] === 18.2 && c.size[1] === 18.2 && c.size[2] === 14.3);
assert(!!pRear, 'polar bear rear torso cube found');
if (pRear) {
assertVec(pRear.center, [0, 17.55, 7.8], 'polar bear rear torso center (expect (0,17.55,7.8))');
}
const pFront = polarCubes.find(({ c }) => c.size[0] === 15.6 && c.size[1] === 15.6 && c.size[2] === 13);
if (pFront) {
// Rear torso sits behind and at the same height as the front torso.
assert(pRear.center[2] > pFront.center[2], 'rear torso behind front torso');
assert(approx(pRear.center[1], pFront.center[1], 1.5), 'rear + front torso at similar height');
}
// ---------- 6. Per-face UV (Blockbench) cubes produce finite, in-range UVs ----------
// Real per-face cube from the default pack phantom model (down face is flipped
// via negative uv_size).
const perFace = {
'minecraft:geometry': [{
description: { identifier: 'geometry.pf', texture_width: 64, texture_height: 64 },
bones: [{
name: 'd2',
cubes: [{
origin: [0, 0, 0], size: [4, 8, 4],
uv: {
north: { uv: [8, 40], uv_size: [4, 8] },
east: { uv: [0, 40], uv_size: [4, 8] },
south: { uv: [12, 40], uv_size: [4, 8] },
west: { uv: [4, 40], uv_size: [4, 8] },
up: { uv: [4, 36], uv_size: [4, 4] },
down: { uv: [8, 40], uv_size: [4, -4] },
},
}],
}],
}],
};
const pfBuilt = GeoBuilder.build(perFace);
const pfCube = pfBuilt.cubes[0];
assert(pfCube && typeof pfCube.uv === 'object', 'per-face cube passed through build()');
if (pfCube) {
const g = GeoBuilder.cubeGeometry(pfCube.size, pfCube.uv, 64, 64);
assert(g.uvs.length === 48, 'per-face geometry emits 24 UVs (48 floats)');
let allFinite = true, allIn01 = true;
for (const u of g.uvs) {
if (!Number.isFinite(u)) allFinite = false;
if (u < 0 || u > 1) allIn01 = false;
}
assert(allFinite, 'per-face UVs are finite (no NaN)');
assert(allIn01, 'per-face UVs within [0,1]');
// south face = index 4 in face order [east,west,top,bottom,south,north]:
// rect [12,40,4,8] -> U 12/64..16/64, V flipped: 1-(40+8)/64 .. 1-40/64.
const southStart = 4 * 8;
let minU = 2, maxU = -1, minV = 2, maxV = -1;
for (let i = 0; i < 8; i += 2) {
minU = Math.min(minU, g.uvs[southStart + i]);
maxU = Math.max(maxU, g.uvs[southStart + i]);
minV = Math.min(minV, g.uvs[southStart + i + 1]);
maxV = Math.max(maxV, g.uvs[southStart + i + 1]);
}
assert(approx(minU, 12 / 64) && approx(maxU, 16 / 64), `per-face south U in (12..16)/64 (got ${minU.toFixed(3)}..${maxU.toFixed(3)})`);
assert(approx(minV, 1 - 48 / 64) && approx(maxV, 1 - 40 / 64), `per-face south V in [0.25,0.375] (got ${minV.toFixed(3)}..${maxV.toFixed(3)})`);
}
// ---------- 7. Per-face rects: negative uv_size mirrors (down face) ----------
const rects = GeoBuilder.perFaceRects(perFace['minecraft:geometry'][0].bones[0].cubes[0].uv);
assert(rects.bottom[3] === -4, 'negative uv_size preserved for down face');
assert(rects.top[3] === 4 && rects.south[2] === 4, 'positive faces keep size');
assert(Array.isArray(GeoBuilder.boxUVRects([0, 0], [4, 8, 4]).south), 'boxUVRects still array-based');
// ---------- summary ----------
if (failures === 0) {
console.log(`geo_builder tests OK (${checks} checks)`);
} else {
console.error(`${failures}/${checks} checks FAILED`);
process.exit(1);
}
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
+37
View File
@@ -0,0 +1,37 @@
# Vendored: Blockbench (web app)
This directory contains the official **Blockbench** web application, mirrored
verbatim from the deployed official build at `https://web.blockbench.net/`
(served by the upstream project), used here as an embedded model editor/viewer
for the Packs site.
- **Project**: Blockbench — https://github.com/JannisX11/blockbench
- **Version**: 5.x (web build; `dist/bundle.js`, mirrored 2026-08-04)
- **License**: GPL-3.0-or-later — see `LICENSE.MD`
## Local modifications
1. `index.html` — removed the Cloudflare Insights beacon `<script>` (external
analytics, not needed offline/same-origin).
2. `index.html` — added `<script src="plugins/packs_bootstrap.js"></script>`
(after the bundle). That script auto-loads the bundled plugins below and
bridges model/texture loading from the Packs site via `postMessage`.
## Bundled plugins
- `plugins/geckolib/`**GeckoLib Models & Animations** (v4.2.5), the official
GeckoLib Blockbench plugin, from the Blockbench plugin store repository
(`JannisX11/blockbench-plugins/plugins/geckolib`).
- `plugins/MultiactorEditor/`**Multi Actor Animator** (v1.0.0) by L1Z0, for
the AnimationDirector mod. Handles `afw_bone_textures` and texture preview.
- `plugins/packs_bootstrap.js` — the site's own bridge (loads the two plugins,
opens a geo model, loads the feature + vanilla textures).
No other upstream files were changed.
## Update note
We intentionally do **not** plan to re-vendor newer Blockbench releases — this
copy is pinned for stability. To update, re-mirror `https://web.blockbench.net/`
(including `dist/bundle.js`, `css/`, `font/`, `assets/`, `icons/`) and re-apply
the two index.html modifications above.
Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.3 KiB

@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="60cm"
height="10cm"
viewBox="0 0 600.00003 99.999996"
version="1.1"
id="svg4515"
inkscape:version="0.92.1 r15371"
sodipodi:docname="blockbench logo text.svg">
<defs
id="defs4509" />
<sodipodi:namedview
id="base"
pagecolor="#131722"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.71372549"
inkscape:pageshadow="2"
inkscape:zoom="0.49497475"
inkscape:cx="1340.8877"
inkscape:cy="315.27428"
inkscape:document-units="mm"
inkscape:current-layer="flowRoot4483"
showgrid="false"
fit-margin-top="1"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="2560"
inkscape:window-height="1377"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
units="cm"
inkscape:pagecheckerboard="true" />
<metadata
id="metadata4512">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(140.5784,-17.878066)">
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.12966676"
d="m -29.706378,30.806338 c -1.108416,0.0095 -4.478608,0.254094 -15.402932,1.006311 -13.528999,0.930396 -27.093046,1.865778 -40.456039,2.780744 -13.514111,0.925183 -12.177861,0.799909 -12.820481,1.201381 -0.72216,0.451158 -1.12991,1.216368 -1.36967,2.570669 -1.99992,9.667486 -3.6033,16.604835 -4.89746,22.227725 -0.0682,0.178292 -0.20695,0.790965 -0.30827,1.361499 -0.17162,0.966409 -0.16812,1.0595 0.0513,1.361502 0.46313,0.637473 1.02227,0.781938 5.0553,1.305847 15.287792,1.997832 31.255938,4.107538 45.344555,5.95505 5.5466,0.727165 10.529453,1.386231 14.198515,1.877761 4.131915,0.553537 4.208011,0.555276 4.389927,0.100101 0.144205,-0.360785 0.408278,-1.596476 0.921027,-4.311486 2.115587,-10.956059 4.57156,-23.821746 6.361526,-32.935299 0.559936,-2.850745 0.586147,-3.162738 0.306942,-3.6408 -0.139592,-0.239019 -0.444979,-0.546176 -0.678662,-0.68265 -0.179637,-0.10492 -0.03051,-0.184025 -0.695562,-0.178355 z m -78.356602,35.549657 c -0.53178,-0.0056 -1.03785,0.03293 -1.55562,0.113205 -0.71316,0.110565 -6.28547,0.907666 -12.38305,1.771394 -6.09757,0.863727 -11.33941,1.662051 -11.64854,1.774054 -0.93017,0.337004 -1.30652,1.263644 -0.86215,2.122975 0.27411,0.530058 0.95685,0.846038 3.10973,1.438999 0.28527,0.07857 0.66466,0.190808 0.84296,0.249393 20.15307,5.654742 41.451482,11.891181 60.295045,17.256762 1.057938,0.31769 2.501573,0.87359 3.421419,0.87639 0.695481,-0.18749 4.670132,-2.148525 13.679781,-6.68233 7.318083,-3.682584 13.413769,-6.789515 13.545876,-6.904381 0.501569,-0.436153 0.767523,-1.377495 0.503344,-1.781652 -0.05239,-0.08016 -0.766247,-0.244666 -1.58639,-0.365638 -1.948245,-0.287372 -8.016854,-1.174396 -10.243742,-1.497307 -0.962778,-0.139611 -2.334065,-0.343533 -3.047233,-0.453201 -0.713168,-0.109669 -2.901297,-0.431669 -4.862505,-0.71551 -1.961208,-0.283844 -5.170336,-0.750839 -7.131546,-1.03784 -1.961208,-0.286998 -4.76201,-0.694699 -6.224003,-0.906023 -3.374552,-0.487777 -10.553237,-1.54021 -14.587513,-2.138552 -1.711599,-0.253855 -4.308245,-0.634066 -5.770238,-0.844862 -8.938365,-1.288733 -11.697485,-1.70288 -12.448005,-1.868642 -1.20341,-0.265793 -2.16131,-0.397846 -3.04762,-0.407234 z m -7.45976,14.488741 c -0.0322,-0.0025 -0.0556,-0.0025 -0.069,1.97e-4 -0.23924,0.05056 -4.98368,10.224374 -4.98368,10.686874 0,0.47325 0.34055,1.05441 0.74722,1.27507 0.4503,0.24433 0.73543,0.2483 1.3879,0.0196 1.97221,-0.6137 4.07472,-1.29836 6.03388,-1.88689 5.84201,-1.752106 5.93859,-1.787926 6.55773,-2.434095 0.51284,-0.535232 1.4552,-2.495345 1.73208,-3.602813 0.0539,-0.215625 0.16745,-0.521963 0.25243,-0.680747 0.085,-0.158784 0.13275,-0.288712 0.10599,-0.288712 -3.40893,-0.882314 -6.94805,-1.843256 -10.17594,-2.728317 -0.70404,-0.193083 -1.36318,-0.341253 -1.58867,-0.360137 z m 60.566666,7.942787 c -0.09959,-0.0041 -0.256236,0.06972 -0.544943,0.238373 -0.310789,0.181524 -1.20705,0.690144 -1.991536,1.130159 -2.1351,1.291192 -4.160901,2.633442 -6.418505,3.698922 -1.831887,1.14652 -2.639198,1.39642 -3.556468,1.10127 -0.895077,-0.288 -3.278152,-0.90905 -3.487896,-0.90905 -0.12379,0 -0.257824,0.10199 -0.298017,0.22679 -0.07029,0.21827 -0.292978,0.84383 -0.842391,2.36648 -0.884785,2.27762 -1.646519,4.577513 -2.44474,6.742733 -0.380796,1.03211 -1.046151,3.40583 -1.035749,3.69512 0.01022,0.2852 0.629786,0.86965 1.108687,1.04583 0.29368,0.10803 0.725879,0.15809 1.026064,0.1189 5.578857,-2.25763 9.832203,-5.1055 14.577449,-7.59064 1.452319,-0.758073 1.98535,-1.288573 2.194392,-2.184133 0.175175,-0.75049 0.503582,-2.21066 0.717219,-3.18931 0.108978,-0.49922 0.322753,-1.46199 0.475236,-2.13951 0.810387,-3.600797 0.862055,-3.936929 0.654917,-4.263992 -0.03484,-0.055 -0.07397,-0.0855 -0.133719,-0.08794 z"
id="path5085"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccscccccccsscsccccsccccscssscccscscccccccccsssccscccccccccccss" />
<g
aria-label="Blockbench"
transform="matrix(0.26458333,0,0,0.26458333,-98.580477,-4.7513379)"
style="font-style:normal;font-weight:normal;font-size:853.33337402px;line-height:1.25;font-family:sans-serif;letter-spacing:-20px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
id="flowRoot4483">
<path
d="m 533.72255,271.50743 q 18.53482,5.16544 29.16956,18.83865 10.63471,13.36937 10.63471,34.03111 0,27.65027 -20.96559,42.53887 -20.66177,14.88862 -60.46599,14.88862 h -101.4856 v -212.6944 h 95.40863 q 36.4619,0 56.21207,14.58476 20.05404,14.58476 20.05404,40.41194 0,16.7117 -7.90006,28.86566 -7.59624,12.15397 -20.66177,18.53479 z M 420.99456,193.72206 v 68.06221 h 62.28907 q 23.39637,0 35.85417,-8.50778 12.76166,-8.81162 12.76166,-25.52333 0,-16.7117 -12.76166,-25.21947 -12.4578,-8.81163 -35.85417,-8.81163 z m 69.88528,163.47084 q 25.82718,0 38.8927,-8.50778 13.06553,-8.50778 13.06553,-26.73872 0,-35.55035 -51.95823,-35.55035 h -69.88528 v 70.79685 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:826.66680908px;line-height:1.25;font-family:Montserrat;-inkscape-font-specification:'Montserrat Medium';letter-spacing:-28.78005028px;fill:#ffffff;fill-opacity:1;stroke-width:0.36755937"
id="path4499"
inkscape:connector-curvature="0" />
<path
d="m 606.03806,156.34862 h 29.16951 v 225.45606 h -29.16951 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:826.66680908px;line-height:1.25;font-family:Montserrat;-inkscape-font-specification:'Montserrat Medium';letter-spacing:-28.78005028px;fill:#ffffff;fill-opacity:1;stroke-width:0.36755937"
id="path4501"
inkscape:connector-curvature="0" />
<path
d="m 749.29753,383.62777 q -24.00409,0 -43.14659,-10.63472 -19.14249,-10.63472 -30.08106,-29.16952 -10.6347,-18.83864 -10.6347,-42.53887 0,-23.70024 10.6347,-42.23503 10.93857,-18.83865 30.08106,-29.16952 19.1425,-10.63473 43.14659,-10.63473 24.00409,0 42.84272,10.63473 19.14253,10.33087 29.77722,29.16952 10.93854,18.53479 10.93854,42.23503 0,23.70023 -10.93854,42.53887 -10.63469,18.5348 -29.77722,29.16952 -18.83863,10.63472 -42.84272,10.63472 z m 0,-25.52333 q 15.4963,0 27.65027,-6.98852 12.4578,-7.29239 19.44636,-20.05405 6.98852,-13.06551 6.98852,-29.77721 0,-16.71171 -6.98852,-29.47337 -6.98856,-13.06552 -19.44636,-20.05405 -12.15397,-6.98853 -27.65027,-6.98853 -15.49631,0 -27.95411,6.98853 -12.15398,6.98853 -19.44635,20.05405 -6.98851,12.76166 -6.98851,29.47337 0,16.7117 6.98851,29.77721 7.29237,12.76166 19.44635,20.05405 12.4578,6.98852 27.95411,6.98852 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:826.66680908px;line-height:1.25;font-family:Montserrat;-inkscape-font-specification:'Montserrat Medium';letter-spacing:-28.78005028px;fill:#ffffff;fill-opacity:1;stroke-width:0.36755937"
id="path4503"
inkscape:connector-curvature="0" />
<path
d="m 932.8075,383.62777 q -24.61177,0 -44.05809,-10.63472 -19.14246,-10.63472 -30.08108,-29.16952 -10.93854,-18.83864 -10.93854,-42.53887 0,-23.70024 10.93854,-42.23503 10.93862,-18.83865 30.08108,-29.16952 19.44632,-10.63473 44.05809,-10.63473 21.87716,0 38.89272,8.81163 17.31942,8.81163 26.73868,25.52333 l -22.18093,14.28091 q -7.59621,-11.54627 -18.83869,-17.3194 -11.2424,-5.77314 -24.91563,-5.77314 -15.80014,0 -28.56181,6.98853 -12.45781,6.98853 -19.75017,20.05405 -6.98851,12.76166 -6.98851,29.47337 0,17.01555 6.98851,30.08106 7.29236,12.76166 19.75017,19.7502 12.76167,6.98852 28.56181,6.98852 13.67323,0 24.91563,-5.77313 11.24248,-5.77313 18.83869,-17.3194 l 22.18093,13.97706 q -9.41926,16.71171 -26.73868,25.82718 -17.01556,8.81162 -38.89272,8.81162 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:826.66680908px;line-height:1.25;font-family:Montserrat;-inkscape-font-specification:'Montserrat Medium';letter-spacing:-28.78005028px;fill:#ffffff;fill-opacity:1;stroke-width:0.36755937"
id="path4505"
inkscape:connector-curvature="0" />
<path
d="m 1085.5481,306.75393 -33.4234,30.99262 v 44.05813 h -29.1695 V 156.34862 h 29.1695 V 300.9808 l 87.8124,-80.21617 h 35.2465 l -67.7583,66.54297 74.443,94.49708 h -35.8542 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:826.66680908px;line-height:1.25;font-family:Montserrat;-inkscape-font-specification:'Montserrat Medium';letter-spacing:-28.78005028px;fill:#ffffff;fill-opacity:1;stroke-width:0.36755937"
id="path4507"
inkscape:connector-curvature="0" />
<path
d="m 1284.6969,219.24538 q 23.3963,0 41.9312,10.33087 18.5348,10.33088 28.8656,28.86568 10.6347,18.5348 10.6347,42.84273 0,24.30792 -10.6347,43.14657 -10.3308,18.5348 -28.8656,28.86567 -18.5349,10.33087 -41.9312,10.33087 -17.9271,0 -32.8157,-6.98853 -14.8886,-6.98853 -24.6118,-20.35789 v 25.52333 h -27.9541 V 156.34862 h 29.1695 v 88.72394 q 9.7232,-12.76166 24.3079,-19.14249 14.5848,-6.68469 31.9042,-6.68469 z m -2.4309,138.85906 q 15.4964,0 27.6504,-6.98852 12.4578,-7.29239 19.4463,-20.05405 7.2924,-13.06551 7.2924,-29.77721 0,-16.71171 -7.2924,-29.47337 -6.9885,-13.06552 -19.4463,-20.05405 -12.154,-6.98853 -27.6504,-6.98853 -15.1924,0 -27.6502,6.98853 -12.4578,6.98853 -19.4463,20.05405 -6.9886,12.76166 -6.9886,29.47337 0,16.7117 6.9886,29.77721 6.9885,12.76166 19.4463,20.05405 12.4578,6.98852 27.6502,6.98852 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:826.66680908px;line-height:1.25;font-family:Montserrat;-inkscape-font-specification:'Montserrat Medium';letter-spacing:-28.78005028px;fill:#ffffff;fill-opacity:1;stroke-width:0.36755937"
id="path4509"
inkscape:connector-curvature="0" />
<path
d="m 1541.3965,302.19621 q 0,3.34234 -0.6078,8.81161 h -130.655 q 2.7346,21.26945 18.5348,34.33496 16.104,12.76166 39.8042,12.76166 28.8657,0 46.4889,-19.44634 l 16.104,18.83864 q -10.9385,12.76167 -27.3464,19.44635 -16.104,6.68468 -36.1581,6.68468 -25.5233,0 -45.2735,-10.33087 -19.7502,-10.63472 -30.6888,-29.47337 -10.6347,-18.83864 -10.6347,-42.53887 0,-23.39639 10.331,-42.23503 10.6346,-18.83865 28.8656,-29.16952 18.5348,-10.63473 41.6273,-10.63473 23.0925,0 41.0197,10.63473 18.2309,10.33087 28.2579,29.16952 10.3309,18.83864 10.3309,43.14658 z m -79.6085,-58.33904 q -20.9656,0 -35.2465,12.76166 -13.9771,12.76167 -16.4078,33.42341 h 103.3087 q -2.4308,-20.3579 -16.7117,-33.11956 -13.9771,-13.06551 -34.9427,-13.06551 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:826.66680908px;line-height:1.25;font-family:Montserrat;-inkscape-font-specification:'Montserrat Medium';letter-spacing:-28.78005028px;fill:#ffffff;fill-opacity:1;stroke-width:0.36755937"
id="path4511"
inkscape:connector-curvature="0" />
<path
d="m 1657.0152,219.24538 q 30.6888,0 48.6159,17.92711 18.231,17.62325 18.231,51.9582 v 92.67399 h -29.1696 v -89.33165 q 0,-23.39639 -11.2424,-35.2465 -11.2424,-11.85011 -32.208,-11.85011 -23.7002,0 -37.3734,13.97705 -13.6732,13.67322 -13.6732,39.50039 v 82.95082 H 1571.026 V 220.76463 h 27.9541 v 24.30793 q 8.8116,-12.45781 23.7002,-19.14249 15.1925,-6.68469 34.3349,-6.68469 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:826.66680908px;line-height:1.25;font-family:Montserrat;-inkscape-font-specification:'Montserrat Medium';letter-spacing:-28.78005028px;fill:#ffffff;fill-opacity:1;stroke-width:0.36755937"
id="path4513"
inkscape:connector-curvature="0" />
<path
d="m 1838.9395,383.62777 q -24.6118,0 -44.0581,-10.63472 -19.1425,-10.63472 -30.0811,-29.16952 -10.9386,-18.83864 -10.9386,-42.53887 0,-23.70024 10.9386,-42.23503 10.9386,-18.83865 30.0811,-29.16952 19.4463,-10.63473 44.0581,-10.63473 21.8771,0 38.8927,8.81163 17.3194,8.81163 26.7387,25.52333 l -22.181,14.28091 q -7.5962,-11.54627 -18.8387,-17.3194 -11.2424,-5.77314 -24.9155,-5.77314 -15.8002,0 -28.5618,6.98853 -12.4579,6.98853 -19.7503,20.05405 -6.9885,12.76166 -6.9885,29.47337 0,17.01555 6.9885,30.08106 7.2924,12.76166 19.7503,19.7502 12.7616,6.98852 28.5618,6.98852 13.6731,0 24.9155,-5.77313 11.2425,-5.77313 18.8387,-17.3194 l 22.181,13.97706 q -9.4193,16.71171 -26.7387,25.82718 -17.0156,8.81162 -38.8927,8.81162 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:826.66680908px;line-height:1.25;font-family:Montserrat;-inkscape-font-specification:'Montserrat Medium';letter-spacing:-28.78005028px;fill:#ffffff;fill-opacity:1;stroke-width:0.36755937"
id="path4515"
inkscape:connector-curvature="0" />
<path
d="m 2015.0765,219.24538 q 30.6888,0 48.6158,17.92711 18.231,17.62325 18.231,51.9582 v 92.67399 h -29.1695 v -89.33165 q 0,-23.39639 -11.2424,-35.2465 -11.2424,-11.85011 -32.208,-11.85011 -23.7003,0 -37.3735,13.97705 -13.6732,13.67322 -13.6732,39.50039 v 82.95082 h -29.1695 V 156.34862 h 29.1695 v 87.2047 q 9.1155,-11.54627 23.7002,-17.9271 14.8887,-6.38084 33.1196,-6.38084 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:826.66680908px;line-height:1.25;font-family:Montserrat;-inkscape-font-specification:'Montserrat Medium';letter-spacing:-28.78005028px;fill:#ffffff;fill-opacity:1;stroke-width:0.36755937"
id="path4517"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+947
View File
@@ -0,0 +1,947 @@
@layer base {
/*Defaults*/
div.tool.wide {
width: 72px;
padding: 1px 0;
}
.hidden, .tooltip_shift, .custom_select ul, .mobile_only, .m_disp {
display: none;
}
div.selection_only {
visibility: hidden;
}
a.open-in-browser {
cursor: pointer;
}
.f_left {
float: left;
}
.f_right {
float: right !important;
}
.i_b {
display: inline-block;
}
label.inline_label {
padding-left: 8px;
padding-right: 8px;
padding-top: 2px;
}
.progress_bar {
background-color: var(--color-back);
height: 18px;
margin-top: 12px;
border-radius: 10px;
}
.progress_bar_inner {
background-color: var(--color-accent);
height: 100%;
width: calc(100% * var(--progress));
border-radius: inherit;
}
.accent_color {
color: var(--color-accent);
font-weight: normal;
}
.slash {
color: var(--color-light);
padding-left: 3px;
padding-right: 3px;
font-weight: normal;
display: inline-block;
}
code, .code {
font-family: var(--font-code);
}
.code {
font-size: 16px;
tab-size: 4;
}
textarea.code {
padding: 5px;
}
.small_text {
font-size: 0.94em;
}
.subtle {
color: var(--color-subtle_text);
}
.color_x {
color: var(--color-axis-x);
}
.color_y {
color: var(--color-axis-y);
}
.color_z {
color: var(--color-axis-z);
}
.color_u {
color: var(--color-axis-u);
}
.color_v {
color: var(--color-axis-v);
}
.color_w {
color: var(--color-axis-w);
}
.button {
display: inline-block;
width: 30px;
text-align: center;
cursor: default;
}
.dark_bordered {
height: 30px;
padding-left: 4px;
padding-top: 1px;
background-color: var(--color-back);
border: 1px solid var(--color-border);
border-radius: 5px;
}
.input_wide {
width: 100%;
padding: 8px;
height: 40px;
padding-bottom: 5px;
}
input.medium_width {
width: 64px;
}
.prism-editor-wrapper {
padding-left: 4px;
padding-top: 1px;
background-color: var(--color-back);
border: 1px solid var(--color-border);
border-radius: 5px;
}
.prism-editor__autocomplete {
background-color: var(--color-back);
border: 1px solid var(--color-accent);
z-index: 30;
}
.prism-editor__autocomplete li:hover {
color: var(--color-light);
}
.prism-editor__autocomplete li.selected {
background-color: var(--color-accent);
color: var(--color-accent_text);
}
.checkerboard, .checkerboard_trigger .checkerboard_target {
--color-checker_offset: rgba(0, 0, 0, 0.16);
background-color: var(--color-checkerboard) !important;
background-image: linear-gradient(45deg, var(--color-checkerboard) 25%, transparent 25%),
linear-gradient(-45deg, var(--color-checkerboard) 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, var(--color-checkerboard) 75%),
linear-gradient(-45deg, var(--color-checker_offset) 75%, var(--color-checkerboard) 75%);
background-size: 30px 30px;
background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
}
body[mode=start] div#center.checkerboard {
background-image: none;
background-color: var(--color-dark) !important;
}
/*UI Elements*/
div.preview {
height: 100%;
width: 100%;
position: relative;
cursor: inherit;
}
.preview > canvas {
background-repeat: no-repeat;
}
div.preview.fixed_ratio {
display: flex;
}
.preview.fixed_ratio > canvas {
margin: auto;
border-radius: 7px;
border: 2px solid var(--color-grid);
}
.preview > .preview_perspective_label {
position: absolute;
width: fit-content;
margin: auto;
bottom: 4px;
right: 0;
left: 0;
pointer-events: none;
opacity: 0.5;
text-transform: uppercase;
}
.preview .preview_menu {
position: absolute;
right: 3px;
top: 2px;
border-radius: 5px;
background-color: var(--color-dark);
display: flex;
}
.checkerboard .preview_menu {
background-color: var(--color-checkerboard);
}
.preview .preview_menu .tool {
width: 32px;
}
.preview .preview_menu .preview_main_menu > i {
width: 20px;
}
.preview .preview_background_menu {
background-size: cover;
width: 30px;
}
.preview > canvas.selectable_cursor {
cursor: copy;
}
#weight_brush_outline {
--radius: 50;
position: absolute;
width: calc(var(--radius) * 2px);
height: calc(var(--radius) * 2px);
margin: calc(var(--radius) * -1px);
border-radius: 50%;
border: 1px dashed var(--color-light);
pointer-events: none;
z-index: 12;
}
.text_padding {
margin-left: 5px;
margin-right: 5px;
}
.toolbar_label {
padding: 2px;
margin-left: 4px;
}
.bar {
height: 30px;
}
.bar > * {
float: left;
}
.bar.flex {
display: flex;
}
.bar.flex > * {
float: none;
}
.bar.flex > label {
flex-grow: 0;
}
.scroll_horizontal {
overflow-x: scroll;
overflow-y: hidden;
height: 100%;
scrollbar-width: none;
}
.scroll_horizontal ::-webkit-scrollbar {
height: 0px;
}
.list {
background-color: var(--color-back);
overflow-y: scroll;
flex-grow: 1;
clear: both;
}
.list::-webkit-scrollbar-track {
background: var(--color-back);
}
ul.list_style li {
list-style: initial;
margin-left: 20px;
}
#quick_message_box {
position: absolute;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
top: 420px;
z-index: 100;
min-width: 150px;
max-width: 250px;
width: fit-content;
padding: 0 12px;
background-color: var(--color-bright_ui);
color: var(--color-bright_ui_text);
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);;
text-align: center;
overflow-wrap: break-word;
cursor: default;
pointer-events: none;
}
@media (max-device-width: 640px) {
#quick_message_box {
bottom: 26px;
top: unset;
padding: 6px;
}
}
#cursor_tooltip {
position: absolute;
z-index: 101;
max-width: 250px;
width: fit-content;
line-height: 18px;
padding: 2px 8px;
margin-top: 10px;
margin-left: 9px;
background-color: var(--color-bright_ui);
color: var(--color-bright_ui_text);
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);;
overflow-wrap: break-word;
white-space: pre-line;
cursor: default;
pointer-events: none;
}
.uv_message_box {
position: absolute;
margin-left: auto;
margin-right: auto;
z-index: 101;
min-width: 100px;
max-width: 200px;
background-color: var(--color-bright_ui);
color: var(--color-bright_ui_text);
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);;
text-align: center;
cursor: default;
top: 40px;
right: 0px;
left: 0px;
pointer-events: none;
}
.selection_rectangle {
position: absolute;
display: block;
border: 1px solid var(--color-accent);
background-color: rgba(40,50,60,0.5);
pointer-events: none;
}
.annotation {
min-width: 40px;
max-width: 100%;
width: max-content;
position: absolute;
text-align: center;
background-color: var(--color-bright_ui);
color: var(--color-bright_ui_text);
padding: 3px 8px;
pointer-events: none;
}
.annotation.transparent {
background: transparent;
font-weight: normal;
font-size: 1.2em;
padding: 0;
margin: -4px;
min-width: 15px;
color: var(--color-light);
text-shadow: 0 0 5px black;
}
.light_on_hover:hover {
color: var(--color-light);
}
.elevated {
background-color: var(--color-elevated);
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
border-radius: 5px;
}
.spinning {
-webkit-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
/*Markdown*/
.markdown h1 {
margin: 8px 0 8px 0;
}
.markdown h2 {
margin: 14px 0 8px 0;
}
.markdown p {
margin: 12px 0;
}
.markdown li {
list-style: initial;
cursor: inherit;
margin: 8px 0;
}
.markdown li > p,
.markdown h2 > p,
.markdown h3 > p {
margin: 0;
}
.markdown ul {
padding-left: 24px;
}
.markdown ol {
padding-left: 24px;
}
.markdown ol li {
list-style: auto;
}
.markdown a {
cursor: pointer;
}
.markdown pre {
border: 1px solid var(--color-border);
background: var(--color-back);
font-family: var(--font-code);
padding: 6px 10px;
clear: both;
cursor: text;
user-select: text;
-webkit-user-select: text;
overflow: auto;
}
.markdown pre code {
user-select: text;
-webkit-user-select: text;
}
blockquote {
border-left: 4px solid var(--color-accent);
padding: 4px;
padding-left: 16px;
background: var(--color-back);
}
.markdown table {
border: 1px solid var(--color-border);
background: var(--color-back);
}
.markdown th {
padding: 4px;
}
.markdown td {
padding: 3px 4px;
border-top: 1px solid var(--color-border);
}
.markdown img {
image-rendering: auto;
max-width: 100%;
}
/*Actions*/
.toolbar {
width: 100%;
overflow: hidden;
flex-shrink: 0;
}
.toolbar > .content {
display: flex;
flex-wrap: wrap;
}
div.toolbar_wrapper {
float: none;
}
.toolbar_wrapper.narrow > .toolbar {
width: fit-content;
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
height: 100%;
}
body.is_mobile .toolbar_wrapper.narrow > .toolbar:not(.vertical) {
width: 100%;
}
.toolbar_wrapper > .toolbar.no_wrap {
width: fit-content;
display: flex;
flex-flow: row-reverse;
flex-wrap: nowrap;
height: 100%;
}
.toolbar_wrapper > .toolbar.no_wrap > .content {
height: 100%;
overflow: hidden;
flex-grow: 1;
}
.toolbar_wrapper > .toolbar.vertical {
width: 40px;
flex-direction: column-reverse;
}
.toolbar_wrapper > .toolbar.vertical .tool {
height: 36px;
width: 40px;
padding: 2px;
}
.toolbar > .tool.toolbar_menu {
float: right;
width: 12px;
color: var(--color-subtle_text);
}
.toolbar.vertical .toolbar_menu {
height: 24px;
padding: 0;
}
.toolbar > .tool.toolbar_menu > i {
width: 16px;
margin-left: -5px;
font-size: 20px;
margin-top: 5px;
}
.toolbar.vertical > .tool.toolbar_menu > i {
width: auto;
margin-right: auto;
margin-left: auto;
}
.toolbar_overflow_popup {
background-color: var(--color-ui);
position: absolute;
display: flex;
flex-wrap: wrap;
max-width: 180px;
z-index: 20;
box-shadow: 0 0px 8px rgba(0, 0, 0, 0.64);
}
.toolbar_overflow_dummy {
height: 30px;
width: 38px;
}
.tool {
height: 30px;
width: 36px;
margin-left: 1px;
margin-right: 1px;
background: transparent;
display: inline-block;
text-align: center;
vertical-align: middle;
cursor: default;
float: left;
color: var(--color-text);
flex-shrink: 0;
cursor: pointer;
}
.tool i {
display: block;
margin: 4px auto;
}
.tool:active > .icon {
padding-top: 1px;
}
.tool:active > .icon.fa_big {
padding-top: 2px;
}
img.icon {
height: 26px;
image-rendering: pixelated;
}
.tool.widget {
width: auto;
padding: 0;
}
.tool.widget.bar_text {
padding: 2px;
}
.tool.has_label {
width: auto;
}
.tool:hover {
color: var(--color-light);
}
.tool.right_tool {
position: relative;
}
.tool.enabled {
background: var(--color-accent);
border-radius: 4px;
color: var(--color-accent_text);
}
.placeholder {
width: 20px;
height: 10px;
float: left;
}
.toolbar .toolbar_separator.border {
width: 2px;
height: 24px;
float: left;
background-color: var(--color-border);
margin: 4px;
margin-bottom: 0;
}
.toolbar .toolbar_separator.spacer {
background: transparent;
flex-grow: 1;
}
.toolbar .toolbar_separator.linebreak {
display: block;
float: left;
width: 100%;
height: 0;
margin: 0;
}
.text_button:hover {
color: var(--color-light);
}
.bar_select_wrapper {
position: relative;
}
.bar_select:hover {
color: var(--color-light);
}
.bar_select select {
padding-right: 24px;
width: 100%;
}
.bar_select .bar_select_wrapper::before {
content: "\f0d7";
font-family: 'Font Awesome 6 Free';
font-weight: 900;
display: block;
position: absolute;
height: 12px;
width: 16px;
pointer-events: none;
right: 6px;
top: 3px;
}
.half {
display: inline-block;
width: calc(50% - 4px);
}
.tooltip {
position: absolute;
height: 28px;
width: fit-content;
padding-left: 6px;
padding-right: 6px;
padding-top: 1px;
background: var(--color-bright_ui);
color: var(--color-bright_ui_text);
margin-top: 30px;
white-space: nowrap;
z-index: 20;
box-shadow: 0 0.4px 3.5px rgba(0, 0, 0, 0.6);
border-radius: 4px;
pointer-events: none;
visibility: hidden;
}
.tool:hover > .tooltip {
visibility: visible;
}
.tooltip_shift {
display: none;
}
.tooltip_description {
position: absolute;
background-color: var(--color-ui);
color: var(--color-text);
border: 1px solid var(--color-bright_ui);
padding: 2px 6px;
margin-top: 1px;
font-size: 0.84em;
margin-left: -5px;
opacity: 0;
}
.tool:hover > .tooltip .tooltip_description {
transition-property: opacity;
transition-duration: 200ms;
transition-delay: 600ms;
opacity: 1;
}
.tool.bar_select.icon_mode {
padding: 0 4px;
background-color: var(--color-button);
border-radius: 5px;
}
.tool.bar_select .select_option {
float: left;
width: 28px;
height: 100%;
border-radius: 4px;
color: var(--color-text);
}
.tool.bar_select .select_option:hover {
color: var(--color-light);
}
.tool.bar_select .select_option.selected {
background: var(--color-accent);
color: var(--color-accent_text);
}
.tool.bar_select .select_option:active {
padding-top: 1px;
}
.tool.bar_select .select_option .icon {
transform: scale(0.86);
}
.tool.bar_select .select_option[key=vertex] .icon {
transform: scale(0.6);
}
.tool.side_menu_tool {
width: 48px;
}
.tool.side_menu_tool i.icon {
display: block;
margin-left: 6px;
float: left;
}
.tool.side_menu_tool i.icon.action_more_options {
display: inline-block;
width: 20px;
height: 100%;
margin-top: 0;
padding-top: 4px;
color: var(--color-text);
margin-left: 0;
}
.tool.side_menu_tool i.icon.action_more_options:hover {
color: inherit;
}
.toolbar.vertical .tool.side_menu_tool {
height: 54px;
}
.toolbar.vertical .tool.side_menu_tool > .action_more_options {
max-width: 48px;
text-align: center;
width: 100%;
margin-top: 0px;
padding-top: 0px;
}
/*(Context-)Menu*/
.contextMenu {
position: absolute;
display: block;
height: auto;
width: fit-content;
min-width: 145px;
background-color: var(--color-bright_ui);
color: var(--color-bright_ui_text);
z-index: 30;
box-shadow: 0.4px 0.4px 4px rgba(0, 0, 0, 0.7);
border-radius: 6px;
cursor: default;
white-space: nowrap;
}
.contextMenu.sub {
display: none;
margin-top: -4px;
}
.contextMenu.scrollable {
max-height: min(800px, 100vh);
overflow: auto;
}
.contextMenu li {
display: flex;
height: 30px;
padding: 4px;
padding-left: 34px;
padding-right: 8px;
}
.contextMenu li:first-of-type {
border-top-left-radius: inherit;
border-top-right-radius: inherit;
}
.contextMenu li:last-of-type {
border-bottom-left-radius: inherit;
border-bottom-right-radius: inherit;
}
.contextMenu li.parent {
padding-right: 20px;
}
.contextMenu li.parent::after {
content: "\f105";
display: block;
font-family: 'Font Awesome 6 Free';
font-weight: 900;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
margin-right: -12px;
margin-left: 6px;
margin-top: -1px;
pointer-events: none;
}
.contextMenu li.enabled {
padding-left: 29px;
border-left: 5px solid var(--color-accent);
}
.contextMenu li.focused,
.contextMenu li.parent.opened {
background-color: var(--color-accent);
color: var(--color-accent_text);
}
.contextMenu li.hybrid_parent.opened {
background-color: transparent;
}
.contextMenu li > i {
margin-top: 1px;
margin-right: 4px;
margin-left: -28px;
pointer-events: none;
}
.contextMenu li > img {
cursor: default;
height: 20px;
width: 20px;
color: var(--color-text);
white-space: nowrap;
margin-bottom: -3px;
margin-left: -27px;
margin-right: 5px;
margin-top: 1px;
}
.contextMenu li > span {
pointer-events: none;
flex: 1 0 auto;
}
.contextMenu li.marked > span {
text-decoration: underline;
}
.contextMenu li.parent.focused > .contextMenu.sub {
display: block;
}
.contextMenu li.hybrid_parent.opened > .contextMenu.sub {
display: block;
}
.contextMenu li.opened > .contextMenu.sub {
display: block;
}
.contextMenu .menu_more_button {
width: 28px;
margin: -4px -8px -4px 2px;
padding: 4px 0;
text-align: center;
border-radius: 5px;
}
.contextMenu .menu_more_button:hover,
.hybrid_parent.opened .menu_more_button {
background-color: var(--color-accent);
color: var(--color-accent_text);
}
.contextMenu .menu_more_button > * {
pointer-events: none;
}
li.menu_separator {
height: 2px;
width: 100%;
padding: 0;
background-color: var(--color-menu_separator);
}
li.menu_separator.has_label {
margin-top: 12px;
margin-bottom: 6px;
}
li.menu_separator.has_label > label {
background-color: var(--color-bright_ui);
color: color-mix(in srgb, var(--color-bright_ui_text) 70%, transparent);
margin-top: -12px;
margin-left: 12px;
padding: 0 5px;
height: 20px;
}
.contextMenu li.highlighted {
animation: menu_item_highlight 1s infinite ease-in-out;
}
@keyframes menu_item_highlight {
0% {
background-color: transparent;
}
50% {
background-color: var(--color-accent);
}
100% {
background-color: transparent;
}
}
.contextMenu .menu_search_bar {
padding: 0;
display: flex;
position: sticky;
top: 0;
background-color: inherit;
border-bottom: 2px solid var(--color-menu_separator);
}
.menu_search_bar > input {
color: inherit;
padding: 6px;
flex-grow: 1;
height: auto;
}
.menu_search_bar > div {
width: 30px;
text-align: center;
padding-top: 2px;
}
.menu_search_bar > div > * {
pointer-events: none;
vertical-align: middle;
}
.keybinding_label {
pointer-events: none;
font-size: 0.84em;
padding: 2px 0 2px 8px;
opacity: 0.6;
flex-grow: 0;
flex-shrink: 0;
}
/* Theme Borders */
body.theme_borders .contextMenu,
body.theme_borders dialog,
body.theme_borders #start_screen > content,
body.theme_borders #quick_message_box,
body.theme_borders action_selector > #action_selector_list,
body.theme_borders .plugins_suggested_row > ul > li
{
border: 1px solid var(--color-border);
}
body.theme_borders #start_screen section {
border-bottom: 1px solid var(--color-border);
}
body.theme_borders .panel {
margin-top: -1px;
border-top: 01px solid var(--color-border);
}
body.theme_borders #right_bar {
border-left: 1px solid var(--color-border);
}
body.theme_borders #left_bar {
border-right: 1px solid var(--color-border);
}
body.theme_borders .preview .preview_menu {
right: 0;
}
body.theme_borders .dialog_sidebar {
border-right: 1px solid var(--color-border);
}
body.theme_borders .dialog_handle {
border-bottom: 1px solid var(--color-border);
}
body.theme_borders .dialog_close_button {
right: -1px;
top: -1px;
height: 34px;
}
body.theme_borders li.animation_file {
border-top: 1px solid var(--color-border);
}
body.theme_borders #main_toolbar, body.theme_borders #tab_bar {
border-bottom: 1px solid var(--color-border);
}
body.theme_borders #status_bar {
border-top: 1px solid var(--color-border);
}
body.theme_borders .contextMenu li.menu_separator {
background-color: var(--color-border);
height: 1px;
padding: 0;
opacity: 1;
}
body.theme_borders #animation_controllers_wrapper .controller_state {
border-color: var(--color-border);
}
}
+512
View File
@@ -0,0 +1,512 @@
/*! jQuery UI - v1.12.1 - 2017-04-02
* http://jqueryui.com
* Includes: draggable.css, core.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=base&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cc0000&fcError=5f3f3f&borderColorError=f1a899&bgTextureError=flat&bgColorError=fddfdf&iconColorHighlight=777620&fcHighlight=777620&borderColorHighlight=dad55e&bgTextureHighlight=flat&bgColorHighlight=fffa90&iconColorActive=ffffff&fcActive=ffffff&borderColorActive=003eff&bgTextureActive=flat&bgColorActive=007fff&iconColorHover=555555&fcHover=2b2b2b&borderColorHover=cccccc&bgTextureHover=flat&bgColorHover=ededed&iconColorDefault=777777&fcDefault=454545&borderColorDefault=c5c5c5&bgTextureDefault=flat&bgColorDefault=f6f6f6&iconColorContent=444444&fcContent=333333&borderColorContent=dddddd&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=444444&fcHeader=333333&borderColorHeader=dddddd&bgTextureHeader=flat&bgColorHeader=e9e9e9&cornerRadius=3px&fwDefault=normal&fsDefault=1em&ffDefault=Arial%2CHelvetica%2Csans-serif
* Copyright jQuery Foundation and other contributors; Licensed MIT */
@layer lib {
.ui-draggable-handle {
-ms-touch-action: none;
touch-action: none
}
.ui-helper-hidden {
display: none
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse
}
.ui-helper-clearfix:after {
clear: both
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter: Alpha(Opacity=0)
}
.ui-front {
z-index: 100
}
.ui-state-disabled {
cursor: default!important;
pointer-events: none
}
.ui-icon {
display: inline-block;
vertical-align: middle;
margin-top: -.25em;
position: relative;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat
}
.ui-widget-icon-block {
left: 50%;
margin-left: -8px;
display: block
}
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%
}
.ui-resizable {
position: relative
}
.ui-resizable-handle {
position: absolute;
font-size: 0.1px;
display: block;
-ms-touch-action: none;
touch-action: none
}
.ui-resizable-disabled .ui-resizable-handle,
.ui-resizable-autohide .ui-resizable-handle {
display: none
}
.ui-resizable-n {
cursor: n-resize;
height: 7px;
width: 100%;
top: -5px;
left: 0
}
.ui-resizable-s {
cursor: s-resize;
height: 7px;
width: 100%;
bottom: -5px;
left: 0
}
.ui-resizable-e {
cursor: e-resize;
width: 7px;
right: -5px;
top: 0;
height: 100%
}
.ui-resizable-w {
cursor: w-resize;
width: 7px;
left: -5px;
top: 0;
height: 100%
}
.ui-resizable-se {
cursor: se-resize;
width: 16px;
height: 16px;
right: -5px;
bottom: -5px
}
.ui-resizable-sw {
cursor: sw-resize;
width: 16px;
height: 16px;
left: -5px;
bottom: -5px
}
.ui-resizable-nw {
cursor: nw-resize;
width: 16px;
height: 16px;
left: -5px;
top: -5px
}
.ui-resizable-ne {
cursor: ne-resize;
width: 16px;
height: 16px;
right: -5px;
top: -5px
}
.ui-selectable {
-ms-touch-action: none;
touch-action: none
}
.ui-selectable-helper {
position: absolute;
z-index: 100;
border: 1px dotted black
}
.ui-sortable-handle {
-ms-touch-action: none;
touch-action: none
}
.ui-accordion .ui-accordion-header {
display: block;
cursor: pointer;
position: relative;
margin: 2px 0 0 0;
padding: .5em .5em .5em .7em;
font-size: 100%
}
.ui-accordion .ui-accordion-content {
padding: 1em 2.2em;
border-top: 0;
overflow: auto
}
.ui-autocomplete {
position: absolute;
top: 0;
left: 0;
cursor: default
}
.ui-dialog .ui-resizable-se,
.ui-dialog .ui-resizable-sw,
.ui-dialog .ui-resizable-ne,
.ui-dialog .ui-resizable-nw {
width: 7px;
height: 7px
}
.ui-dialog .ui-resizable-se {
right: 0;
bottom: 0
}
.ui-dialog .ui-resizable-sw {
left: 0;
bottom: 0
}
.ui-dialog .ui-resizable-ne {
right: 0;
top: 0
}
.ui-dialog .ui-resizable-nw {
left: 0;
top: 0
}
.ui-draggable .ui-dialog-titlebar {
cursor: move
}
.ui-progressbar {
height: 2em;
text-align: left;
overflow: hidden
}
.ui-progressbar .ui-progressbar-value {
margin: -1px;
height: 100%
}
.ui-progressbar .ui-progressbar-overlay {
background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
height: 100%;
filter: alpha(opacity=25);
opacity: 0.25
}
.ui-progressbar-indeterminate .ui-progressbar-value {
background-image: none
}
.ui-tooltip {
padding: 8px;
position: absolute;
z-index: 9999;
max-width: 300px
}
body .ui-tooltip {
border-width: 2px
}
.ui-widget {
font-family: Arial, Helvetica, sans-serif;
font-size: 1em
}
.ui-widget .ui-widget {
font-size: 1em
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: Arial, Helvetica, sans-serif;
font-size: 1em
}
.ui-widget.ui-widget-content {
border: 1px solid #c5c5c5
}
.ui-widget-content {
border: 1px solid #ddd;
background: #fff;
color: #333
}
.ui-widget-content a {
color: #333
}
.ui-widget-header {
border: 1px solid #ddd;
background: #e9e9e9;
color: #333;
font-weight: bold
}
.ui-widget-header a {
color: #333
}
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default,
.ui-button,
html .ui-button.ui-state-disabled:hover,
html .ui-button.ui-state-disabled:active {
border: 1px solid #c5c5c5;
background: #f6f6f6;
font-weight: normal;
color: #454545
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited,
a.ui-button,
a:link.ui-button,
a:visited.ui-button,
.ui-button {
color: #454545;
text-decoration: none
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus,
.ui-button:hover,
.ui-button:focus {
border: 1px solid #ccc;
background: #ededed;
font-weight: normal;
color: #2b2b2b
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited,
a.ui-button:hover,
a.ui-button:focus {
color: #2b2b2b;
text-decoration: none
}
.ui-visual-focus {
box-shadow: 0 0 3px 1px rgb(94, 158, 214)
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
border: 1px solid #003eff;
background: #007fff;
font-weight: normal;
color: #fff
}
.ui-icon-background,
.ui-state-active .ui-icon-background {
border: #003eff;
background-color: #fff
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #fff;
text-decoration: none
}
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #dad55e;
background: #fffa90;
color: #777620
}
.ui-state-checked {
border: 1px solid #dad55e;
background: #fffa90
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #777620
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #f1a899;
background: #fddfdf;
color: #5f3f3f
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #5f3f3f
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #5f3f3f
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
filter: Alpha(Opacity=70);
font-weight: normal
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
filter: Alpha(Opacity=35);
background-image: none
}
.ui-state-disabled .ui-icon {
filter: Alpha(Opacity=35)
}
.ui-icon {
width: 16px;
height: 16px
}
.ui-icon-blank {
background-position: 16px 16px
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 3px
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 3px
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 3px
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 3px
}
.ui-widget-overlay {
background: #aaa;
opacity: .3;
filter: Alpha(Opacity=30)
}
.ui-widget-shadow {
-webkit-box-shadow: 0 0 5px #666;
box-shadow: 0 0 5px #666
}
}
File diff suppressed because it is too large Load Diff
+219
View File
@@ -0,0 +1,219 @@
/* PrismJS 1.17.1
https://prismjs.com/download.html#themes=prism-okaidia&languages=css+json */
/**
* okaidia theme for JavaScript, CSS and HTML
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
* @author ocodia
*/
@layer lib {
.prism-editor-wrapper code {
font-family: inherit;
line-height: inherit;
display: block;
}
.prism-editor-component {
height: auto;
max-height: 100%;
-webkit-box-align: start;
-ms-flex-align: start;
align-items: flex-start;
position: relative;
}
.prism-editor-component,
.prism-editor-wrapper {
width: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.prism-editor-wrapper {
height: 100%;
overflow: auto;
-o-tab-size: 1.5em;
tab-size: 1.5em;
-moz-tab-size: 1.5em;
}
.prism-editor-wrapper pre {
display: inline-block;
width: 100%;
}
div.prism-editor-wrapper .prism-editor-placeholder {
color: #6f7276;
pointer-events: none;
width: 0;
overflow: visible;
display: inline-block;
}
div.prism-editor-wrapper:focus-within .prism-editor-placeholder {
visibility: hidden;
}
.prism-editor__line-numbers {
height: 100%;
overflow: hidden;
-ms-flex-negative: 0;
flex-shrink: 0;
padding-top: 4px;
margin-top: 0;
border-right: 1px solid var(--color-border);
margin-right: 4px;
padding-right: 4px;
}
.prism-editor__line-number {
text-align: right;
white-space: nowrap;
}
.prism-editor__autocomplete {
position: absolute;
min-width: 100px;
width: 100%;
max-width: 250px;
top: 25px;
min-height: 12px;
max-height: 180px;
overflow-y: auto;
z-index: 4;
}
.prism-editor__autocomplete li {
overflow: hidden;
white-space: nowrap;
padding: 1px 5px;
cursor: pointer;
}
.prism-editor__code {
margin-top: 0 !important;
margin-bottom: 0 !important;
-webkit-box-flex: 2;
-ms-flex-positive: 2;
flex-grow: 2;
min-height: 100%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-o-tab-size: 4;
tab-size: 4;
-moz-tab-size: 4;
outline: none;
}
pre.prism-editor__code:focus {
outline: none;
}
}
@layer base {
code[class*='language-'],
pre[class*='language-'] {
color: #f8f8f2;
background: none;
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
font-family: var(--font-code);
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
cursor: text;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*='language-'] {
padding: 1em;
margin: 0.5em 0;
border-radius: 0.3em;
}
:not(pre) > code[class*='language-'],
pre[class*='language-'] {
background: var(--color-back);
}
/* Inline code */
:not(pre) > code[class*='language-'] {
padding: 0.1em;
border-radius: 0.3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: var(--color-text);
}
.namespace {
opacity: 0.7;
}
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
color: #f92672;
}
.token.boolean,
.token.number {
color: #ae81ff;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #a6e22e;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #f8f8f2;
}
.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
color: #e6db74;
}
.token.keyword {
color: #66d9ef;
}
.token.regex,
.token.important {
color: #fd971f;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
}
+862
View File
@@ -0,0 +1,862 @@
@layer reset, lib, base, plugin, theme, theme-override;
@layer reset {
* {
margin: 0;
padding: 0;
outline: none;
outline-color: rgba(0, 0, 0, 0);
}
body {
user-select: none;
-webkit-user-select: none;
}
div {
cursor: default;
box-sizing: border-box;
}
a {
text-decoration: none;
cursor: default;
color: inherit;
}
i {
cursor: inherit;
}
b {
font-weight: bolder;
}
li {
list-style: none;
cursor: default;
}
}
@layer base {
/*INIT*/
body.is_mobile * {
user-select: none;
-webkit-user-select: none;
}
[hidden], template {
display: none;
}
/*Webkit*/
a[href] {
color: inherit;
text-decoration: underline;
cursor: pointer;
}
a[href]:hover {
color: var(--color-light);
}
.bright_ui a[href]:hover {
color: var(--color-accent);
}
/* SCROLLBARS */
/* webkit */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: var(--color-ui);
}
::-webkit-scrollbar-corner {
background: var(--color-ui);
}
::-webkit-scrollbar-thumb {
background: var(--color-selected);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--color-accent);
}
/* Web standard */
* {
scrollbar-width: thin;
scrollbar-color: var(--color-selected) transparent;
}
::selection {
background: var(--color-accent);
}
body.is_mobile ::-webkit-scrollbar {
width: 0;
height: 0;
}
body.is_mobile * {
scrollbar-width: none;
}
body.is_mobile .mobile_scrollbar {
scrollbar-width: initial;
}
body.is_mobile .mobile_scrollbar::-webkit-scrollbar {
width: 20px;
height: 20px;
}
body.is_mobile .mobile_scrollbar::-webkit-scrollbar-thumb {
border-radius: 10px;
}
/*Assistant Font*/
@font-face {
font-family: 'Assistant';
font-style: normal;
font-weight: 200;
src: local('Assistant-ExtraLight'),
url(../font/Assistant-ExtraLight.ttf) format('truetype');
}
@font-face {
font-family: 'Assistant';
font-style: normal;
font-weight: 300;
src: local('Assistant-Light'),
url(../font/Assistant-Light.ttf) format('truetype');
}
@font-face {
font-family: 'Assistant';
font-style: normal;
font-weight: 400;
src: local('Assistant-Regular'),
url(../font/Assistant-Regular.ttf) format('truetype');
}
@font-face {
font-family: 'Assistant';
font-style: normal;
font-weight: 600;
src: local('Assistant-SemiBold'),
url(../font/Assistant-SemiBold.ttf) format('truetype');
}
@font-face {
font-family: 'Assistant';
font-style: normal;
font-weight: 600;
src: local('Assistant-Bold'),
url(../font/Assistant-Bold.ttf) format('truetype');
}
@font-face {
font-family: 'Assistant';
font-style: normal;
font-weight: 700;
src: local('Assistant-ExtraBold'),
url(../font/Assistant-ExtraBold.ttf) format('truetype');
}
@font-face {
font-family: 'Montserrat';
font-style: normal;
font-weight: 100 1000;
src: local('Montserrat-VariableFont'),
url(../font/Montserrat-VariableFont_wght.ttf) format('truetype'),
url(../font/Montserrat-VariableFont_wght.ttf) format('truetype');
}
/* https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@1 */
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(../font/material-icons.woff2) format('woff');
}
@font-face {
font-family: 'icomoon';
font-weight: normal;
font-style: normal;
src: url('../font/icomoon.ttf') format('truetype'),
url('../font/icomoon.woff') format('woff');
}
/*Icons*/
[class^="icon-"]:not(.fa), [class*=" icon-"]:not(.fa) {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
font-size: 1.4em;
max-width: 24px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-keyframe_discontinuous_bezier:before {
content: "\e92d";
}
.icon-keyframe_smooth:before {
content: "\e92c";
}
.icon-keyframe_step:before {
content: "\e92b";
}
.icon-keyframe_bezier:before {
content: "\e92a";
}
.icon-collada:before {
content: "\e926";
}
.icon-fbx:before {
content: "\e927";
}
.icon-format_bedrock_block:before {
content: "\e928";
}
.icon-format_bedrock_entity:before {
content: "\e929";
}
.icon-keyframe:before {
content: "\e924";
}
.icon-keyframe_discontinuous:before {
content: "\e925";
}
.icon-gizmo:before {
content: "\e922";
}
.icon-gltf:before {
content: "\e923";
}
.icon-format_bedrock_legacy:before {
content: "\e91a";
}
.icon-crossbow:before {
content: "\e91b";
}
.icon-format_bedrock:before {
content: "\e91c";
}
.icon-format_block:before {
content: "\e91d";
}
.icon-format_free:before {
content: "\e91e";
}
.icon-format_hytale:before {
content: "\e91f";
}
.icon-format_java:before {
content: "\e920";
}
.icon-format_optifine:before {
content: "\e921";
}
.icon-sketchfab:before {
content: "\e919";
}
.icon-blockbench_file:before {
content: "\e900";
}
.icon-vertexsnap:before {
content: "\e901";
}
.icon-create_bitmap:before {
content: "\e902";
}
.icon-objects:before {
content: "\e903";
}
.icon-bow:before {
content: "\e904";
}
.icon-bb_interface:before {
content: "\e905";
}
.icon-blockbench:before {
content: "\e906";
}
.icon-x11:before {
content: "\e907";
}
.icon-baby_zombie:before {
content: "\e908";
}
.icon-armor_stand:before {
content: "\e909";
}
.icon-armor_stand_small:before {
content: "\e90a";
}
.icon-ground:before {
content: "\e90b";
}
.icon-hud:before {
content: "\e90c";
}
.icon-inventory_full:before {
content: "\e90d";
}
.icon-inventory_nine:before {
content: "\e90e";
}
.icon-inventory_single:before {
content: "\e90f";
}
.icon-player_head:before {
content: "\e910";
}
.icon-zombie:before {
content: "\e911";
}
.icon-blockbench_inverted:before {
content: "\e912";
}
.icon-optifine_file:before {
content: "\e913";
}
.icon-saved:before {
content: "\e914";
}
.icon-player:before {
content: "\e915";
}
.icon-mirror_x:before {
content: "\e916";
}
.icon-mirror_y:before {
content: "\e917";
}
.icon-mirror_z:before {
content: "\e918";
}
.icon {
user-select: none;
}
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 22px;
max-width: 22px;
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
overflow: hidden;
flex-shrink: 0;
}
i.fa_big {
font-size: 18px;
height: 22px;
width: 22px;
padding-top: 1px;
text-align: center;
vertical-align: text-top;
}
.dialog .message_box_icon {
font-size: 40pt;
float: left;
padding-right: 8px;
height: 54px;
min-width: 61px;
max-width: 62px;
}
.dialog .message_box_icon.fa {
font-size: 35pt;
}
.dialog img.message_box_icon {
min-width: auto;
}
/*Vars*/
body {
--color-back: #181b1f;
--color-dark: #101316;
--color-border: #101316;
--color-ui: #1e2127;
--color-accent: #3e90ff;
--color-button: #33383f;
--color-selected: #3b3e49;
--color-elevated: #272a31;
--color-frame: #121418;
--color-text: #cacad4;
--color-light: #f4f3ff;
--color-accent_text: #000006;
--color-bright_ui_text: #000006;
--color-subtle_text: #848891;
--color-bright_ui: #f4f3ff;
--color-bright_border: var(--color-text);
--color-grid: #30333d;
--color-wireframe: #576f82;
--color-checkerboard: #14171b;
--color-menu_separator: #b0afba;
--color-guidelines: rgba(136, 150, 157, 0.35);
--color-close: #d62e3f;
--color-confirm: #90ee90;
--color-error: #ff2a51;
--color-warning: #ffc400;
--color-stream: #6442A4;
--color-axis-x: #ff1242;
--color-axis-y: #23d400;
--color-axis-z: #0894ed;
--color-axis-u: #23d4ed;
--color-axis-v: #ff12ed;
--color-axis-w: #ffd442;
--color-spline-handle-mirrored: #ff1242;
--color-spline-handle-aligned: #F0B000;
--color-spline-handle-free: #00D123;
--font-custom-main: '';
--font-custom-headline: '';
--font-custom-code: '';
--font-main: var(--font-custom-main), Assistant, segoe ui, sans-serif;
--font-headline: var(--font-custom-headline), Montserrat, segoe ui, sans-serif;
--font-code: var(--font-custom-code), Consolas, Monospace;
}
/*Elements*/
html {
height: 100%;
overflow-y: hidden;
}
body {
height: 100%;
width: 100%;
position: fixed;
font-family: var(--font-main);
font-size: 16px;
font-weight: normal;
color: var(--color-text);
outline-color: var(--color-accent);
background-color: var(--color-dark);
image-rendering: pixelated;
forced-color-adjust: none;
}
hr {
border-top: 1px solid var(--color-border);
margin: 12px 0;
}
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-headline);
margin: 12px 0 8px 0;
}
h1 {
letter-spacing: -0.03em;
font-weight: 800;
}
h2 {
font-weight: 200;
margin: 0;
}
h3 {
font-size: 1.28em;
font-weight: inherit;
margin-left: 16px;
min-width: 10px;
}
h4 {
font-size: 1.2em;
font-weight: inherit;
}
/*Inputs*/
input {
-webkit-appearance: none;
appearance: none;
border: none;
background: transparent;
color: inherit;
font-size: 1em;
font-family: inherit;
outline: none;
-webkit-user-select: initial;
}
button {
border: none;
background: var(--color-button);
display: inline-block;
text-align: center;
vertical-align: middle;
cursor: default;
outline: none;
height: 32px;
min-width: 100px;
width: auto;
color: var(--color-text);
padding-right: 16px;
padding-left: 16px;
font-weight: normal;
cursor: pointer;
border-radius: 5px;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
}
button.disabled {
opacity: 0.5;
pointer-events: none;
}
button:hover {
background: var(--color-accent);
color: var(--color-accent_text) !important;
}
button:focus {
text-decoration: underline;
}
button.minor {
background: transparent;
border: none;
text-decoration: underline;
}
button.minor:hover {
color: var(--color-light) !important;
}
button > i {
pointer-events: none;
vertical-align: sub;
margin-right: 4px;
}
select {
-webkit-appearance: none;
appearance: none;
outline: none;
outline-color: var(--color-accent);
border: none;
background-color: var(--color-button);
height: 30px;
padding-top: 2px;
padding-left: 10px;
padding-right: 10px;
color: var(--color-text);
}
select:hover{
color: var(--color-light);
}
select:focus{
text-decoration: underline;
}
select option {
-webkit-appearance: none;
appearance: none;
background-color: var(--color-back);
outline: none;
border: none;
}
textarea {
width: 100%;
height: -webkit-fill-available;
padding: 4px;
border: 1px solid var(--color-border);
background: var(--color-back);
color: var(--color-text);
border-radius: 5px;
resize: none;
outline: none;
user-select: initial;
-webkit-user-select: initial;
}
div[contenteditable="true"] {
user-select: initial;
-webkit-user-select: initial;
}
div.bb-select,
select {
display: block;
position: relative;
background-color: var(--color-button);
text-align: left;
height: 30px;
min-width: 50px;
padding-top: 4px;
padding-left: 8px;
padding-right: 24px;
border-radius: 5px;
color: var(--color-text);
white-space: nowrap;
overflow: hidden;
}
div.bb-select:hover,
select {
color: var(--color-light);
}
div.bb-select::before {
content: "\f0d7";
font-family: 'Font Awesome 6 Free';
font-weight: 900;
display: block;
position: absolute;
height: 12px;
width: 16px;
pointer-events: none;
right: 3px;
top: 3px;
}
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button {
-webkit-appeareance: none;
}
input[type=range] {
background-color: transparent;
height: 30px;
position: relative;
--color-track: var(--color-grid);
--color-thumb: var(--color-accent);
--color-center: var(--color-back);
}
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
height: 20px;
width: 20px;
margin-top: -9px;
border: none;
background-color: var(--color-center);
border: 2px solid var(--color-thumb);
border-radius: 50%;
cursor: pointer;
z-index: 3;
}
input[type=range]::-moz-range-thumb {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
height: 20px;
width: 20px;
border:none;
background-color: var(--color-center);
border: 2px solid var(--color-thumb);
border-radius: 50%;
cursor: pointer;
z-index: 3;
}
input[type=range]:not([disabled=disabled])::-webkit-slider-thumb:hover {
background-color: var(--color-thumb);
border: none;
}
input[type=range]:not([disabled=disabled])::-moz-range-thumb:hover {
background-color: var(--color-thumb);
border: none;
}
input[type=range][disabled=disabled]::-webkit-slider-thumb {
background-color: var(--color-button);
}
input[type=range][disabled=disabled]::-moz-range-thumb {
background-color: var(--color-button);
}
input[type=range]::-webkit-slider-runnable-track {
width: 100%;
height: 3px;
cursor: pointer;
background: var(--color-track);
}
input[type=range]::-moz-range-track {
width: 100%;
height: 2px;
cursor: pointer;
background: var(--color-track);
border-radius: 3px;
}
input[type=text].dark_bordered:read-only {
color: var(--color-subtle_text);
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 30px var(--color-back) inset !important;
}
input:-webkit-autofill {
-webkit-text-fill-color: var(--color-text) !important;
border-left: 4px solid var(--color-confirm);
}
input[type=password] {
font-size: 1.2em;
}
input[type=checkbox] {
min-width: 30px;
text-align: center;
}
input[type=checkbox]::before {
content: "\f0c8";
font-family: 'Font Awesome 6 Free';
font-weight: 300;
font-size: 15pt;
}
input[type=checkbox]:checked::before {
content: "\f14a";
font-family: 'Font Awesome 6 Free';
font-weight: 600;
}
input[type=checkbox]:focus, input[type=radio]:focus {
color: var(--color-light);
}
input[type=checkbox][disabled=disabled] {
color: var(--color-subtle_text);
}
input[type=checkbox].toggle_switch {
height: 22px;
width: 46px;
background-color: var(--color-button);
position: relative;
--color: var(--color-text);
border-radius: 12px;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
cursor: pointer;
transition: background-color 70ms ease-out;
}
input[type=checkbox].toggle_switch:checked {
background-color: var(--color-accent);
--color: var(--color-light);
}
input[type=checkbox].toggle_switch::before {
content: "";
width: 10px;
height: 10px;
border-radius: 50%;
margin: 6px;
position: absolute;
left: 0;
transition: left 120ms ease-out, background-color 120ms ease-out;
background-color: var(--color);
}
input[type=checkbox].toggle_switch:checked::before {
left: calc(100% - 22px);
}
input[type=radio]::before {
content: "\f111";
font-family: 'Font Awesome 6 Free';
font-weight: 300;
font-size: 15pt;
}
input[type=radio]:checked::before {
content: "\f192";
}
input[type=radio][disabled=disabled] {
color: var(--color-subtle_text);
}
input:-webkit-autofill,
input:-webkit-autofill:focus {
transition: background-color 600000s 0s, color 600000s 0s;
}
.numeric_input {
position: relative;
flex-shrink: 1;
flex-grow: 1;
}
.numeric_input > input {
position: relative;
width: 100%;
}
.numeric_input > div.tool {
position: absolute;
width: 18px;
right: 1px;
top: 0;
color: var(--color-subtle_text);
cursor: ew-resize;
}
.numeric_input > div.tool > i {
font-size: 18px;
margin-top: 6px;
}
div.nslide {
position: relative;
height: 28px;
width: 100%;
padding: 3px;
padding-left: 6px;
cursor: e-resize;
overflow: hidden;
white-space: nowrap;
outline: none;
background-color: var(--color-elevated);
border-radius: 4px;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}
.tool.nslide_tool.has_percentage_bar .nslide::after {
content: "";
position: absolute;
pointer-events: none;
bottom: 0;
left: 0;
height: 3px;
width: calc(var(--percentage) * 1%);
background-color: var(--color-accent);
}
.tool.nslide_tool.is_colored .nslide::before {
content: "";
position: absolute;
pointer-events: none;
top: 0;
right: 0;
border-width: 4px;
border-style: solid;
border-color: var(--corner-color);
border-bottom-color: transparent !important;
border-left-color: transparent !important;
}
div.nslide_arrow {
position: absolute;
z-index: 17;
display: inline-block;
width: 20px;
height: 24px;
margin-top: -29px;
user-select: none;
margin-left: -42px;
overflow: hidden;
text-align: center;
}
div.nslide.editing {
cursor: text;
}
.numeric_input.is_colored::before {
content: "";
position: absolute;
pointer-events: none;
top: 0;
right: 0;
z-index: 1;
border-width: 4px;
border-style: solid;
border-color: var(--corner-color);
border-bottom-color: transparent !important;
border-left-color: transparent !important;
}
input.toggle_panel {
display: none;
}
label.toggle_panel {
height: 30px;
width: 56px;
padding: 4px;
display: inline-block;
text-align: center;
cursor: pointer;
flex-grow: 1;
margin: 2px;
}
label.toggle_panel:hover {
color: var(--color-light);
}
input:checked + label.toggle_panel {
background-color: var(--color-button);
}
input:checked + label.toggle_panel:hover {
background-color: var(--color-selected);
}
.y_scrollable {
overflow-y: scroll;
}
}
+488
View File
@@ -0,0 +1,488 @@
/***
Spectrum Colorpicker v1.8.0
https://github.com/bgrins/spectrum
Author: Brian Grinstead
License: MIT
***/
@layer lib {
.sp-container {
position:absolute;
top:0;
left:0;
display:inline-block;
/* https://github.com/bgrins/spectrum/issues/40 */
z-index: 1;
overflow: hidden;
}
.sp-container:not(.sp-flat) {
z-index: 42;
}
.sp-container.sp-flat {
position: relative;
background: transparent;
box-shadow: none;
border: none;
width: 100%;
}
.sp-container.sp-flat {
position: relative;
background: transparent;
box-shadow: none;
}
.sp-container.sp-flat .sp-picker-container {
width: calc(100% - 4px);
padding: 2px;
padding-bottom: 0;
margin-bottom: -12px;
}
.sp-container.sp-flat .sp-button-container {
display: none;
}
.sp-container.sp-flat .sp-input-container {
width: 100%;
}
/* Fix for * { box-sizing: border-box; } */
.sp-container,
.sp-container * {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
.sp-top {
position:relative;
width: 100%;
display:inline-block;
}
.sp-top-inner {
position:absolute;
top:0;
left:0;
bottom: 4px;
right:0;
}
.sp-alpha-enabled .sp-top-inner {
bottom: 16px;
}
.sp-color {
position: absolute;
top:0;
left:0;
bottom:0;
right: 32px;
}
.sp-hue {
position: absolute;
top:0;
right:0;
bottom:0;
width: 24px;
height: 100%;
}
.sp-clear-enabled .sp-hue {
top:30px;
height: 77.5%;
}
.sp-fill {
padding-top: 80%;
}
.sp-sat, .sp-val {
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
}
.sp-alpha-enabled .sp-top {
margin-bottom: 12px;
}
.sp-alpha-enabled .sp-alpha {
display: block;
}
.sp-alpha-handle {
position: absolute;
top: 0px;
bottom: -4px;
left: 50%;
cursor: pointer;
display: block;
height: 30px;
width: 12px;
margin-top: -6px;
background-color: var(--color-ui);
border: 1px solid var(--color-border);
}
.sp-alpha-inner:hover .sp-alpha-handle {
background-color: var(--color-accent);
}
.sp-alpha {
display: none;
position: absolute;
bottom: -14px;
right: 0;
left: 0;
height: 22px;
margin-top: 16px;
}
.sp-clear {
display: none;
}
.sp-clear.sp-clear-display {
background-position: center;
}
.sp-clear-enabled .sp-clear {
display: block;
position:absolute;
top:0px;
right:0;
bottom:0;
left:84%;
height: 28px;
}
/* Don't allow text selection */
.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
-webkit-user-select:none;
-moz-user-select: -moz-none;
-o-user-select:none;
user-select: none;
}
.sp-container.sp-input-disabled .sp-input-container {
display: none;
}
.sp-container.sp-buttons-disabled .sp-button-container {
display: none;
}
.sp-container.sp-palette-buttons-disabled .sp-palette-button-container {
display: none;
}
.sp-palette-only .sp-picker-container {
display: none;
}
.sp-palette-disabled .sp-palette-container {
display: none;
}
.sp-initial-disabled .sp-initial {
display: none;
}
/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */
.sp-sat {
background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));
background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));
background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";
filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');
}
.sp-val {
background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));
background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));
background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";
filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');
}
.sp-hue {
background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));
background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
}
/* IE filters do not support multiple color stops.
Generate 6 divs, line them up, and do two color gradients for each.
Yes, really.
*/
.sp-1 {
height:17%;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
}
.sp-2 {
height:16%;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');
}
.sp-3 {
height:17%;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');
}
.sp-4 {
height:17%;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');
}
.sp-5 {
height:16%;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');
}
.sp-6 {
height:17%;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');
}
.sp-hidden {
display: none !important;
}
/* Clearfix hack */
.sp-cf:before, .sp-cf:after { content: ""; display: table; }
.sp-cf:after { clear: both; }
body.is_touch .sp-fill { padding-top: 64%; }
.sp-dragger {
border-radius: 6px;
height: 8px;
width: 8px;
border: 1px solid var(--color-border);
background: var(--color-light);
cursor: pointer;
position:absolute;
top:0;
left: 0;
margin-top: 3px;
margin-left: 3px;
}
.sp-slider {
position: absolute;
top:0;
cursor:pointer;
height: 0;
left: -3px;
right: -3px;
margin-top: -8px;
border-color: var(--color-light);
border-style: solid;
border-width: 8px;
border-top-color: transparent;
border-bottom-color: transparent;
margin-top: -8px;
border-radius: 3px;
}
/*
Theme authors:
Here are the basic themeable display options (colors, fonts, global widths).
See http://bgrins.github.io/spectrum/themes/ for instructions.
*/
.sp-container {
border-radius: 0;
background-color: var(--color-ui);
box-shadow: 0 0px 20px rgba(0, 0, 0, 0.56);
border-radius: 6px;
padding: 0;
}
.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
/* Input */
.sp-input-container {
float: left;
width: 48%;
margin-top: -3px;
}
.sp-input {
height: 30px;
width: 100%;
padding-left: 4px;
background-color: var(--color-back);
border: 1px solid var(--color-border);
font-family: var(--font-code);
font-size: 0.8em;
border-radius: 5px;
}
.sp-input.sp-validation-error {
border: 1px solid red;
}
.sp-picker-container , .sp-palette-container {
float:left;
position: relative;
padding: 10px;
}
.sp-picker-container {
width: 172px;
padding-left: 8px;
}
/* Palettes */
.sp-palette-container {
padding-right: 0;
}
.sp-palette-only .sp-palette-container {
border: 0;
}
.sp-palette .sp-thumb-el {
display: block;
position:relative;
float:left;
width: 24px;
height: 15px;
margin: 3px;
cursor: pointer;
border:solid 2px transparent;
}
.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {
border-color: var(--color-accent);
}
.sp-thumb-el {
position:relative;
}
/* Initial */
.sp-initial {
float: left;
border: solid 1px #333;
}
.sp-initial span {
width: 30px;
height: 25px;
border:none;
display:block;
float:left;
margin:0;
}
.sp-initial .sp-clear-display {
background-position: center;
}
/* Buttons */
.sp-palette-button-container,
.sp-button-container {
float: right;
height: 27px;
}
.sp-button-container a:hover {
color: var(--color-light);
}
/* Replacer (the little preview div that shows up instead of the <input>) */
.sp-replacer {
margin:0;
overflow:hidden;
cursor:pointer;
padding: 6px;
height: 30px;
display:inline-block;
color: var(--color-text);
vertical-align: middle;
outline: none;
border-radius: 5px;
}
.sp-replacer:hover, .sp-replacer.sp-active {
color: var(--color-light);
}
.sp-replacer.sp-disabled {
cursor:default;
border-color: silver;
color: silver;
}
.sp-dd {
padding: 2px 0;
height: 16px;
line-height: 16px;
float:left;
font-size:10px;
pointer-events: none;
}
.sp-preview {
position:relative;
width:25px;
height: 20px;
margin-right: 5px;
float:left;
z-index: 0;
pointer-events: none;
}
.sp-palette {
width: 40px;
max-height: 220px;
overflow-y: scroll;
}
.sp-palette .sp-thumb-el {
width: 26px;
height: 20px;
margin: 1px;
border: 2px solid var(--color-border);
}
.sp-reset {
font-size: 11px;
margin:0;
padding:2px;
margin-right: 5px;
vertical-align: middle;
text-decoration:none;
}
.sp-cancel {
font-size: 11px;
margin:0;
padding:2px;
margin-right: 5px;
vertical-align: middle;
text-decoration:none;
}
.sp-choose {
vertical-align: middle;
}
.sp-palette span:hover, .sp-palette span.sp-thumb-active {
border-color: #000;
}
.sp-preview, .sp-alpha, .sp-thumb-el {
position:relative;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
}
.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner {
display:block;
position:absolute;
top:0;left:0;bottom:0;right:0;
}
.sp-palette .sp-thumb-inner {
background-position: 50% 50%;
background-repeat: no-repeat;
}
.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);
}
.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);
}
.sp-clear-display {
background-repeat:no-repeat;
background-position: center;
}
}
+612
View File
@@ -0,0 +1,612 @@
@layer base {
/*Start Screen*/
#mode_screen_start {
flex-grow: 1;
}
#start_screen {
min-height: 300px;
flex-grow: 1;
width: 100%;
padding: 36px 0;
overflow-y: auto;
background: linear-gradient(180deg, var(--color-ui) 5%, var(--color-dark) 60%);
}
body.is_mobile #start_screen {
padding: 0;
}
#start_screen h3 {
margin: 0;
}
#start_screen .start_screen_features h3 {
font-weight: 800;
}
#start_screen .bar.next_to_title {
position: absolute;
right: 8px;
}
#start_screen button {
margin-right: 4px;
margin-top: 4px;
}
#start_screen .recent_project {
margin: 2px 0;
display: flex;
align-items: center;
cursor: pointer;
}
#start_screen .recent_project:hover {
color: var(--color-light);
}
#start_screen .recent_project .icon_wrapper {
flex-shrink: 0;
margin-top: 1px;
}
#start_screen .recent_project_name {
font-size: 1.1em;
overflow-x: hidden;
flex-shrink: 1;
flex-grow: 1;
margin: 0 4px;
}
#start_screen .recent_project_date {
flex-shrink: 0;
position: relative;
color: var(--color-subtle_text);
}
span.recent_project_date:before {
content: "";
display: block;
position: absolute;
width: 16px;
height: 26px;
margin-left: -20px;
}
#start_screen .recent_favorite_button {
color: var(--color-subtle_text);
visibility: hidden;
cursor: pointer;
--color-active-favorite: #f9c300;
}
#start_screen .recent_project:hover .recent_favorite_button {
color: var(--color-subtle_text);
visibility: visible;
}
#start_screen .recent_project.thumbnail .recent_favorite_button {
color: var(--color-text);
position: absolute;
top: 4px;
right: 4px;
padding: 2px 4px;
}
#start_screen .recent_project .recent_favorite_button:hover {
color: var(--color-light);
visibility: visible;
}
#start_screen .recent_favorite_button.favorite_enabled {
visibility: visible;
color: #ffda24;
}
#start_screen div.start_screen_right .recent_favorite_button > i {
font-size: 16px;
vertical-align: bottom;
}
#start_screen .recent_favorite_button.favorite_enabled > i {
color: var(--color-active-favorite);
}
#start_screen_view_menu {
height: 30px;
position: absolute;
top: 32px;
right: 20px;
}
#start_screen_view_menu li.selected {
border-bottom: 3px solid var(--color-accent);
}
#start_screen .recent_project.thumbnail {
display: block;
margin: 0;
height: 130px;
position: relative;
background-color: var(--color-elevated);
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
border-radius: 5px;
cursor: pointer;
}
#start_screen .recent_project.thumbnail .thumbnail_image {
display: block;
width: 180px;
height: 100px;
margin: auto;
pointer-events: none;
}
#start_screen .recent_project.thumbnail:hover {
background-color: var(--color-selected);
}
#start_screen .recent_project.thumbnail .recent_project_name {
font-size: 1em;
overflow: hidden;
height: 30px;
right: 0px;
left: 0px;
bottom: 0;
margin: 0;
padding-top: 2px;
position: absolute;
text-align: center;
white-space: nowrap;
}
#start_screen .recent_project.thumbnail .icon_wrapper {
position: absolute;
display: none;
pointer-events: none;
padding: 2px;
color: var(--color-text);
top: 4px;
left: 5px;
}
#start_screen .recent_project.thumbnail:hover .recent_project_name {
color: var(--color-light);
}
#start_files ul.redact li.recent_project.thumbnail .thumbnail_image {
background: transparent !important;
}
#start_screen .recent_project.thumbnail:hover .icon_wrapper {
display: block;
}
#start_screen_view_menu .search_bar {
min-width: 38px;
height: 100%;
float: left;
margin-right: 10px;
}
#start_screen > content {
display: block;
max-width: 1000px;
height: auto;
margin-left: auto;
margin-right: auto;
background: linear-gradient(180deg, var(--color-ui) 160px, var(--color-back) 1000px);
box-shadow: 0 0 18px #00000060;
overflow-x: hidden;
image-rendering: auto;
border-radius: 6px;
}
#start_screen > content > section {
width: 100%;
height: auto;
display: flex;
position: relative;
}
#start_screen > content > section.vertical {
flex-direction: column;
}
div.start_screen_left, div.start_screen_right {
display: block;
padding: 24px;
max-height: 606px;
}
div.start_screen_right > ul {
max-height: 470px;
padding-right: 5px;
overflow-x: hidden;
overflow-y: auto;
grid-template-columns: repeat(auto-fit, minmax(170px ,1fr));
grid-gap: 5px;
margin-left: -10px;
}
div.start_screen_right > ul.recent_list_grid {
display: grid;
margin-left: 0;
padding: 4px;
gap: 8px;
}
#start_screen div.start_screen_left {
max-width: 100%;
flex-grow: 0;
}
#start_screen div.graphic:not(.graphic_icon) {
background-size: cover;
position: relative;
padding: 0;
}
#start_screen div.graphic p {
position: absolute;
font-size: 0.96em;
}
#start_screen div.graphic.graphic_icon i {
font-size: 40px;
width: 42px;
max-width: unset;
margin-top: 4px;
margin-right: -20px;
}
#start_screen .start_screen_graphic_description {
bottom: 15px;
right: 0;
padding: 2px;
padding-right: 15px;
padding-left: 100px;
background: linear-gradient(90deg, rgba(3,86,112,0) 0%, rgba(0,10,22,0.63) 34%, rgba(0,9,20,0.72) 45%);
color: #d5d5d5;
position: absolute;
}
#start_screen div.start_screen_right {
flex-grow: 1;
width: 70%;
}
#start_screen section.vertical div.start_screen_right {
width: auto;
text-align: center;
}
#start_screen i.start_screen_close_button {
position: absolute;
top: 8px;
right: 8px;
cursor: pointer;
}
#start_screen i.start_screen_close_button:not(:hover) {
opacity: 0.8;
}
#start_screen section.vertical .start_screen_right {
box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
}
#start_screen section.vertical.bright_ui .start_screen_right {
box-shadow: 0 0 14px #00103030;
}
#start_screen .start_screen_features {
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
padding: 12px;
}
#start_screen .start_screen_features > li {
width: 100%;
box-sizing: border-box;
margin: 7px;
padding: 7px;
display: flex;
gap: 20px;
}
#start_screen .start_screen_features > li:nth-child(odd) {
flex-direction: row-reverse;
text-align: right;
}
#start_screen .start_screen_features > li > * {
max-width: 100%;
font-weight: 300;
display: block;
margin: auto;
width: 50%;
}
#start_screen .start_screen_features > li > img {
max-height: 230px;
width: 58%;
border-radius: 11px;
-webkit-user-drag: none;
}
#start_screen .start_screen_features > li > h3 {
font-size: 1.4em;
}
@media (max-device-width: 640px) {
#start_screen {
width: 100%;
}
#start_screen > content {
margin-top: 0px;
margin-top: 0px;
margin-left: 0;
margin-right: 0;
max-height: 100%;
}
#start_screen > content > section {
display: block;
}
#start_screen > content > section > div.start_screen_right {
width: 100% !important;
float: none;
}
#start_screen > content > section > div.start_screen_left {
width: 100% !important;
float: none;
}
#start_screen > content > section > div.start_screen_left {
width: 100% !important;
float: none;
}
#start_screen .start_screen_features > li {
flex-direction: column !important;
text-align: center !important;
}
#start_screen .start_screen_features > li > * {
width: 100% !important;
}
}
#splash_screen {
aspect-ratio: 21/9;
width: 100%;
min-height: 100px;
}
#splash_screen .splash_art_slideshow_image {
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
}
#splash_screen .splash_art_slideshow_image.slideshow_previous {
position: absolute;
top: 0;
bottom: 0;
animation: fade_out_slideshow 500ms forwards;
}
@keyframes fade_out_slideshow {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.splash_art_slideshow_points {
position: absolute;
bottom: 10px;
left: 0;
right: 0;
margin: auto;
width: fit-content;
height: 24px;
display: flex;
opacity: 0;
transition: opacity 300ms ease-in-out;
}
#splash_screen:hover .splash_art_slideshow_points {
opacity: 1;
}
.splash_art_slideshow_points > li {
color: var(--color-text);
cursor: pointer;
width: 24px;
height: 24px;
text-align: center;
}
.splash_art_slideshow_points > li::after {
content: "";
display: block;
width: 10px;
height: 10px;
border-radius: 50%;
margin: auto;
margin-top: 9px;
background-color: var(--color-text);
opacity: 0.8;
}
.splash_art_slideshow_points > li:hover::after {
background-color: var(--color-light);
}
.splash_art_slideshow_points > li.selected::after {
background-color: var(--color-accent);
}
#start_files div.start_screen_left {
width: 30%;
padding: 20px 0 0px 0;
position: relative;
display: flex;
flex-direction: column;
}
#start_files div.start_screen_right {
position: relative;
min-height: 250px;
}
#start_files div.start_screen_left h2 {
margin-left: 24px;
}
#start_files div.start_screen_left > ul {
padding-bottom: 16px;
overflow-y: auto;
}
#start_files div.start_screen_right i {
vertical-align: sub;
}
.tool.quickstart_button i {
font-size: 17pt;
}
#start_files li.format_category {
margin-top: 16px;
padding-left: 6px;
padding-right: 6px;
}
#start_files li.format_category > label {
color: var(--color-subtle_text);
font-size: 18px;
margin-left: 24px;
}
#start_files li.format_entry {
padding: 4px 0;
cursor: pointer;
font-size: 18px;
padding-left: 18px;
border-radius: 6px;
}
#start_files li.format_entry span.icon_wrapper {
height: 30px;
width: 32px;
display: flex;
}
#start_files li.format_entry > * {
cursor: inherit;
}
#start_files li.format_entry:hover {
color: var(--color-light);
}
#start_files li.format_entry.selected {
background-color: var(--color-accent);
color: var(--color-accent_text);
}
#start_files li.format_entry.selected::after {
float: right;
content: "\f105";
font-family: 'Font Awesome 6 Free';
font-weight: 900;
margin-right: 10px;
}
.format_entry i {
font-size: 18pt;
height: 22px;
margin: 2px 8px 0px 0;
display: inline-block;
}
.format_entry i.fa_big {
font-size: 16pt;
}
.format_entry.start_screen_link:hover {
text-decoration: underline;
}
.format_entry.start_screen_link::after {
float: right;
content: "\f08e";
font-family: 'Font Awesome 6 Free';
font-weight: 900;
color: var(--color-subtle_text);
font-size: 15px;
margin-right: 10px;
}
#start_screen .start_screen_format_page {
display: flex;
flex-direction: column;
}
.format_target {
padding: 10px 0;
margin-bottom: 22px;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 4px;
}
.format_target span {
padding: 2px 10px;
background-color: var(--color-accent);
border-radius: 16px;
color: var(--color-accent_text);
}
#start_files .button_bar {
text-align: left;
padding-right: 14px;
margin-top: auto;
}
#start_files .format_page_close_button {
margin-top: 8px;
margin-left: -2px;
cursor: pointer;
width: 28px;
position: absolute;
right: 18px;
}
.start_screen_format_page button#create_new_model_button {
width: 100%;
height: 40px;
}
.start_screen_format_page button#create_new_model_button > i {
vertical-align: bottom;
margin-right: 3px;
margin-bottom: 2px;
}
section#keymap_preference {
display: block !important;
}
section#keymap_preference > ul {
display: grid;
grid-template-columns: auto auto auto;
grid-gap: 6px;
padding: 12px;
}
section#keymap_preference > h2 {
padding: 12px 20px;
}
section#keymap_preference > p {
padding: 0 20px;
}
section#keymap_preference .keymap_select_box {
display: inline-block;
padding: 12px;
min-height: 132px;
background-color: var(--color-back);
cursor: pointer;
border: 2px solid transparent;
}
section#keymap_preference .keymap_select_box:hover {
color: var(--color-light);
border-color: var(--color-accent);
background-color: var(--color-ui);
}
section#keymap_preference .keymap_select_box p {
color: var(--color-subtle_text);
}
#start_screen section#quick_setup {
padding: 20px 24px;
display: block;
border-bottom: 5px solid var(--color-border);
border-top: 5px solid var(--color-border);
}
section#quick_setup > h2 {
display: block;
}
section#quick_setup > div {
display: inline-flex;
align-items: center;
flex-wrap: wrap;
width: 420px;
max-width: 100%;
margin-right: 48px;
margin-top: 16px;
margin-bottom: 8px;
}
section#quick_setup > div > label {
min-width: 120px;
display: inline-block;
}
section#quick_setup > div .bb-select {
flex-grow: 1;
}
section#quick_setup > div > p {
color: var(--color-subtle_text);
}
.quick_setup_theme {
cursor: pointer;
flex-basis: 0;
flex-grow: 1;
white-space: nowrap;
}
.quick_setup_theme > div {
height: 36px;
width: 36px;
border-radius: 50%;
margin-right: 6px;
display: inline-block;
vertical-align: middle;
border: 2px solid var(--color-border);
color: var(--color-text);
padding-top: 8px;
background-color: var(--color-ui);
cursor: inherit;
text-align: center;
}
.quick_setup_theme:hover,
.quick_setup_theme.selected {
color: var(--color-light);
}
.quick_setup_theme:hover > div,
.quick_setup_theme.selected > div {
border-color: var(--color-accent);
}
}
+33
View File
@@ -0,0 +1,33 @@
/* W3.CSS 4.04 Apr 2017 by Jan Egil and Borge Refsnes */
@layer reset {
html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}
/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */
html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}
article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}
audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline}
audio:not([controls]){display:none;height:0}[hidden],template{display:none}
a{background-color:transparent;-webkit-text-decoration-skip:objects}
a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}
dfn{font-style:italic}mark{background:#ff0;color:#000}
small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none}svg:not(:root){overflow:hidden}
code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible}
button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold}
button,input{overflow:visible}button,select{text-transform:none}
button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}
button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner{border-style:none;padding:0}
button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring{outline:1px dotted ButtonText}
fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}
legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}
[type=checkbox],[type=radio]{padding:0}
[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}
[type=search]{-webkit-appearance:textfield;outline-offset:-2px}
[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}
::-webkit-input-placeholder{color:inherit;opacity:0.54}
::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}
/* End extract */
html,body{font-family:Verdana,sans-serif;font-size:15px;line-height:1.5}html{overflow-x:hidden}
h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}.w3-serif{font-family:serif}
h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin:10px 0}.w3-wide{letter-spacing:4px}
hr{border:0;border-top:1px solid #eee;margin:20px 0}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

+226
View File
@@ -0,0 +1,226 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Blockbench</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#121418">
<meta name="color-scheme" content="dark">
<meta name="robots" content="noindex">
<link rel="manifest" href="manifest.webmanifest">
<link rel="shortcut icon" href="favicon.png" type="image/x-icon" />
<link rel="apple-touch-icon" href="icon_full.png">
<link rel="stylesheet" href="css/w3.css">
<link rel="stylesheet" href="css/jquery-ui.min.css">
<link rel="stylesheet" href="css/fontawesome.css">
<link rel="stylesheet" href="css/spectrum.css">
<link rel="stylesheet" href="css/prism.css">
<link rel="stylesheet" href="css/setup.css" id="setup_stylesheet">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/window.css">
<link rel="stylesheet" href="css/start_screen.css">
<link rel="stylesheet" href="css/panels.css">
<link rel="stylesheet" href="css/dialogs.css">
<style type="text/css" id="theme_css"></style>
<style type="text/css" id="theme_thumbnail_css"></style>
</head>
<body spellcheck="false" class="maximized">
<script>
if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix
if (localStorage.getItem('theme')) {
try {
stored_theme = JSON.parse(localStorage.getItem('theme'));
let dark_color = stored_theme.colors.dark;
if (dark_color) {
document.getElementById('theme_css').textContent = `@layer theme {body {--color-dark: ${dark_color};}};`
}
} catch (err) {}
}
window.ErrorLog = [];
window.onerror = (message, file, line) => {
if (message.includes('ResizeObserver loop completed with undelivered notifications')) return;
window.ErrorLog.push({message, file, line})
if (typeof Blockbench != 'undefined' && Blockbench.setup_successful) return;
let error_element = document.querySelector('#loading_error_detail');
if (error_element && !error_element.innerText) {
error_element.innerText = `${message}\nIn .${file.split(location.origin).join('')}:${line}`
}
let version = document.querySelector('#loading_error_version');
if (version && window.Blockbench) {
version.innerText = Blockbench.version;
}
}
window.factoryResetAndReload = function() {
let lang_key = 'menu.help.developer.reset_storage.confirm';
let result = window.confirm((window.tl && tl(lang_key) != lang_key) ? tl(lang_key) : 'Are you sure you want to reset Blockbench to factory settings? This will delete all custom settings, keybindings and installed plugins.');
if (result) {
localStorage.clear();
if ('Blockbench' in window) Blockbench.addFlag('no_localstorage_saving');
console.log('Cleared Local Storage');
window.location.reload(true);
}
}
</script>
<div id="loading_error_message" style="display: none;">
<div>An error occurred while loading Blockbench</div>
<div id="loading_error_detail" style="color: var(--color-subtle_text);"></div>
<button onclick="window.Blockbench ? window.Blockbench.reload() : window.location.reload(true)" class="large" style="margin-right: auto; margin-left: auto;">Reload</button>
<button onclick="factoryResetAndReload()" class="large" style="margin-right: auto; margin-left: auto;">Factory Reset</button>
<button onclick="window.close()" class="large" style="margin-right: auto; margin-left: auto;">Quit</button>
<div id="loading_error_version" style="color: var(--color-subtle_text);"></div>
</div>
<script type="module" src="dist/bundle.js"></script>
<script src="plugins/packs_bootstrap.js"></script>
<div style="display: none;"></div>
<div id="dialog_wrapper"></div>
<header>
<ul id="mac_window_menu" hidden></ul>
<div id="corner_logo" class="app-drag-region">
<img class="blockbench_logo" src="assets/logo_text_white.svg" alt="Blockbench" />
</div>
<ul id="menu_bar" class="scroll_horizontal"></ul>
<div id="title_bar_home_button" class="tool hidden" onclick="Interface.tab_bar.openNewTab()"><i class="material-icons icon">home</i></div>
<div class="app-drag-region" id="header_free_bar"></div>
<div id="update_menu"></div>
<div id="settings_profiles_header_menu" class="hidden tool">
<i class="material-icons icon">manage_accounts</i>
</div>
<ul id="windows_window_menu" hidden>
<li id="window_controls_button_minimize">
<svg width="18" height="18" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M14 8v1H3V8h11z"/></svg>
</li>
<li id="window_controls_button_maximize">
<svg class="restore" width="18" height="18" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M3 5v9h9V5H3zm8 8H4V6h7v7z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5 5h1V4h7v7h-1v1h2V3H5v2z"/></svg>
<svg class="maximize" width="18" height="18" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M3 3v10h10V3H3zm9 9H4V4h8v8z"/></svg>
</li>
<li class="wwm_r" id="window_controls_button_close">
<svg width="18" height="18" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.116 8l-4.558 4.558.884.884L8 8.884l4.558 4.558.884-.884L8.884 8l4.558-4.558-.884-.884L8 7.116 3.442 2.558l-.884.884L7.116 8z"/></svg>
</li>
</ul>
<button id="web_download_button" hidden><a href="https://blockbench.net/downloads">
<span class="tl">web.download_app</span>
<i class="material-icons icon">system_update</i>
</a></button>
</header>
<div id="page_wrapper" class="invisible start_screen">
<div id="blackout" class="darken"></div>
<div id="tab_bar" :class="{drag_mode: drag_target_index !== null}">
<div id="tab_bar_list" @wheel="mousewheelBar($event)" ref="tab_bar_list">
<div
class="project_tab"
v-for="(project, index) in tabs" :key="project.uuid"
:class="{
selected: project.selected,
new_tab: project.is_new_tab,
dragging: index == drag_target_index,
move_back: (drag_position_index !== null && index > drag_target_index && drag_position_index >= index),
move_forth: (drag_position_index !== null && index < drag_target_index && drag_position_index <= index)
}"
:title="project.name || project.geometry_name || ''"
@dblclick="project.openSettings()"
@contextmenu="project.showContextMenu($event)"
@mousedown="mouseDown(project, $event)"
@mouseup="mouseUp(project, $event)"
@mouseenter="mouseEnter(project, $event)"
@mouseleave="mouseLeave(project, $event)"
>
<dynamic-icon :icon="project.format ? project.format.icon : 'home'"></dynamic-icon>
<label class="project_tab_session_badge" v-if="project.EditSession"><i class="material-icons">group</i>{{ project.EditSession.client_count }}</label>
<label>{{ project.getDisplayName(false) }}<span v-if="project.getFileExtension?.()">.{{ project.getFileExtension() }}</span></label>
<div class="project_tab_close_button" :class="{unsaved: !project.saved}" :title="close_tab_label" @click="project.close()">
<i class="material-icons close_icon">clear</i>
<i class="material-icons unsaved_icon" v-if="!project.saved">fiber_manual_record</i>
</div>
</div>
<div id="new_tab_button" v-if="!new_tab.visible" @click="openNewTab()" :title="new_tab.name">
<i class="material-icons">add</i>
</div>
</div>
<div id="search_tab_button" v-if="projects.length > 1" @click="tabOverview()" :title="search_tabs_label">
<i class="material-icons">view_module</i>
</div>
</div>
<dialog id="action_selector"></dialog>
<div id="start_screen"></div>
<div id="work_screen" hidden>
<div id="main_toolbar">
<div class="toolbar_wrapper narrow tools"></div>
<div class="toolbar_wrapper narrow tool_options"></div>
<ul id="mode_selector" v-if="showModes()">
<li
v-for="mode in options"
v-if="Condition(mode.condition)"
v-bind:class="{selected: mode.selected}"
v-on:mousedown="mode.select()"
>
<dynamic-icon :icon="mode.icon"></dynamic-icon>
{{ mode.name }}
</li>
</ul>
</div>
<div id="left_bar" class="sidebar"></div>
<div id="right_bar" class="sidebar"></div>
<div id="center">
<ul id="toast_notification_list"></ul>
<div id="top_slot"></div>
<div id="preview">
<div class="clamped_reference_images"></div>
</div>
<div id="bottom_slot"></div>
<div id="mobile_panel_overlay" hidden></div>
</div>
<div id="status_bar"></div>
<div id="panel_selector_bar"></div>
</div>
</div>
<script type="module">
let browser_check_passed = false;
// Browser compatibility check
try {
eval('[1].at(0)');
let stylesheet = document.getElementById('setup_stylesheet');
if (!stylesheet || !stylesheet.sheet?.cssRules?.length) {
throw 'Stylesheet not loaded';
}
browser_check_passed = true;
} catch (err) {
console.error(err);
let error_element = document.querySelector('#loading_error_detail')
error_element.innerHTML = `Incompatible browser version. Please update your web browser.`;
}
if (!window.Blockbench?.setup_successful || !browser_check_passed) {
document.getElementById('loading_error_message').style.display = 'block'
if (window.require) {
require('@electron/remote').getCurrentWindow().webContents.openDevTools();
} else if (window.openDevTools) {
window.openDevTools();
}
} else {
document.getElementById('loading_error_message').innerHTML = 'No loading errors...'
}
</script>
</body>
</html>
+36
View File
@@ -0,0 +1,36 @@
{
"$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/web-manifest.json",
"short_name": "Blockbench",
"name": "Blockbench",
"icons": [
{
"src": "favicon.png",
"type": "image/png",
"sizes": "128x128"
},
{
"src": "icon.png",
"type": "image/png",
"sizes": "1024x1024"
},
{
"src": "icon_maskable.png",
"type": "image/png",
"sizes": "256x256",
"purpose": "maskable"
}
],
"screenshots": [
{
"src": "content/front_page_app.png",
"sizes": "1920x1040",
"type": "image/png",
"label": "Blockbench Interface"
}
],
"start_url": "./index.html",
"background_color": "#21252b",
"theme_color": "#3e90ff",
"display": "standalone",
"display_override": ["window-controls-overlay"]
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,89 @@
// packs_bootstrap.js — injected into the vendored Blockbench app (same origin).
// Loads the GeckoLib + Multi Actor Animator plugins and bridges model/texture
// loading from the parent page via postMessage.
(function () {
if (window.PacksBB) return;
function waitFor(fn, timeout) {
return new Promise((resolve) => {
const start = Date.now();
const iv = setInterval(() => {
if (fn()) { clearInterval(iv); resolve(true); }
else if (Date.now() - start > timeout) { clearInterval(iv); resolve(false); }
}, 100);
});
}
function notify(type, payload) {
if (window.parent && window.parent !== window) {
window.parent.postMessage(Object.assign({ type: 'packs-' + type }, payload || {}), window.location.origin);
}
}
async function loadPlugin(path, id) {
if (Plugins.registered[id]) {
// already registered (persisted from a previous session) — ensure active
const existing = Plugins.registered[id];
if (existing.installed && !existing.disabled && typeof existing.onload === 'function' && existing.source === 'file') {
return existing;
}
}
const code = await (await fetch(path, { cache: 'no-store' })).text();
if (!code || code.length < 20) throw new Error('empty plugin: ' + path);
const inst = new Plugin();
await inst.loadFromFile({ path: path, content: code }, true);
return inst;
}
async function openModel(msg) {
await waitFor(() => typeof loadModelFile === 'function', 15000);
const name = msg.name || 'model';
await loadModelFile({ content: JSON.stringify(msg.geo), name: name, path: name });
// Give the format importer a beat, then load the textures and let
// Blockbench's own default-texture logic apply them.
await new Promise((r) => setTimeout(r, 800));
for (const t of (msg.textures || [])) {
try {
const tex = new Texture({ name: t.name || 'texture', folder: 'entity' });
if (t.dataUrl) {
await tex.fromDataURL(t.dataUrl);
} else if (t.url) {
await tex.fromPath(t.url);
}
tex.add(false);
} catch (e) {
console.error('packs texture load failed', t && t.name, e);
}
}
await new Promise((r) => setTimeout(r, 400));
notify('model-open', { name: name });
}
window.addEventListener('message', (e) => {
if (!e.data || e.data.type !== 'packs-open-model') return;
openModel(e.data).then(
() => {},
(err) => {
console.error('packs-open-model failed', err);
notify('model-error', { name: e.data.name || '', error: String(err) });
}
);
});
async function boot() {
window.confirm = () => true;
const ok = await waitFor(() => window.Blockbench && window.Blockbench.setup_successful && window.Plugin && typeof loadModelFile === 'function', 30000);
if (!ok) { notify('error', { error: 'Blockbench did not initialize' }); return; }
try {
await loadPlugin('plugins/geckolib/geckolib.js', 'geckolib');
await loadPlugin('plugins/MultiactorEditor/MultiactorEditor.js', 'MultiactorEditor');
} catch (e) {
console.error('packs plugin load failed', e);
notify('plugin-error', { error: String(e) });
}
window.PacksBB = { ready: true, plugins: ['geckolib', 'MultiactorEditor'] };
notify('bb-ready', {});
}
boot();
})();
File diff suppressed because one or more lines are too long
+5 -39
View File
@@ -391,23 +391,11 @@
<p class="modal-caption" id="gallery-modal-caption"></p>
</div>
</div>
<div class="modal-overlay" id="model-modal" hidden>
<div class="modal-content model-modal-content">
<button type="button" class="modal-close" data-close-modal aria-label="Close"><i class="fas fa-times"></i></button>
<h3 class="model-modal-title" id="model-modal-title"></h3>
<div id="model-viewer-container"></div>
<p class="bio-help"><i class="fas fa-info-circle"></i> Drag to rotate · scroll to zoom</p>
<p class="bio-help model-disclaimer"><i class="fas fa-exclamation-triangle"></i> This is just a preview — if the model is broken, contact Jake so he can fix it.</p>
</div>
</div>
{% endblock %}
{% block extra_js %}
{% if models_manifest %}
<script src="{% static 'vendor/three.min.js' %}"></script>
<script src="{% static 'js/geo_builder.js' %}"></script>
<script src="{% static 'js/model_viewer.js' %}"></script>
<script src="{% static 'js/packs_preview.js' %}"></script>
{% endif %}
<script>
(function () {
@@ -493,41 +481,19 @@
modal.hidden = true;
const media = modal.querySelector('.modal-media');
if (media) media.innerHTML = '';
if (modal.id === 'model-modal') {
const viewer = document.getElementById('model-viewer-container');
if (viewer) viewer.innerHTML = '';
if (window.PacksModelViewer) window.PacksModelViewer.dispose();
}
}
});
});
document.querySelectorAll('.modal-overlay').forEach(modal => {
modal.addEventListener('click', (e) => {
if (e.target === modal) {
modal.hidden = true;
if (modal.id === 'model-modal' && window.PacksModelViewer) window.PacksModelViewer.dispose();
}
if (e.target === modal) modal.hidden = true;
});
});
// Model renderer (Three.js showcase).
if (window.PacksModelViewer) {
// Model renderer (Blockbench showcase).
if (window.PacksPreview) {
document.querySelectorAll('.model-render-btn').forEach(btn => {
btn.addEventListener('click', () => {
document.getElementById('model-modal-title').textContent = btn.dataset.name || '';
const container = document.getElementById('model-viewer-container');
container.innerHTML = '';
window.PacksModelViewer.render(
btn.dataset.member,
container,
{
baseUrl: btn.dataset.baseUrl,
vanillaBaseUrl: btn.dataset.vanillaBaseUrl,
defaultTexture: btn.dataset.defaultTexture || null,
}
);
document.getElementById('model-modal').hidden = false;
});
btn.addEventListener('click', () => window.PacksPreview.open(btn));
});
}
})();