zincjs 1.12.2 → 1.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ const TextureSlides = function (textureIn) {
|
|
|
19
19
|
this.morph = new THREE.Group();
|
|
20
20
|
this.group = this.morph;
|
|
21
21
|
this.morph.userData = this;
|
|
22
|
+
let edgesLine = undefined;
|
|
22
23
|
let flipY = true;
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -59,7 +60,7 @@ const TextureSlides = function (textureIn) {
|
|
|
59
60
|
mesh.position.z = 0;
|
|
60
61
|
switch (settings.direction) {
|
|
61
62
|
case "x":
|
|
62
|
-
const rotation =
|
|
63
|
+
const rotation = -Math.PI / 2;
|
|
63
64
|
mesh.rotation.y = rotation;
|
|
64
65
|
uniforms.direction.value = 1;
|
|
65
66
|
uniforms.slide.value.set(settings.value, 0, 0);
|
|
@@ -303,9 +304,13 @@ const TextureSlides = function (textureIn) {
|
|
|
303
304
|
this.boundingBoxUpdateRequired = true;
|
|
304
305
|
}
|
|
305
306
|
|
|
307
|
+
this.setRenderOrder = (order) => {
|
|
308
|
+
//multiilayers
|
|
309
|
+
this.morph.renderOrder = order;
|
|
310
|
+
}
|
|
311
|
+
|
|
306
312
|
this.initialise = (textureData, finishCallback) => {
|
|
307
313
|
if (textureData) {
|
|
308
|
-
|
|
309
314
|
const locations = textureData.locations;
|
|
310
315
|
if (locations && locations.length > 0) {
|
|
311
316
|
this.applyTransformation(locations[0].orientation,
|
|
@@ -320,6 +325,25 @@ const TextureSlides = function (textureIn) {
|
|
|
320
325
|
}
|
|
321
326
|
}
|
|
322
327
|
}
|
|
328
|
+
|
|
329
|
+
this.showEdges = (color) => {
|
|
330
|
+
if (!edgesLine) {
|
|
331
|
+
const geometry = new THREE.BoxGeometry( 1, 1, 1 );
|
|
332
|
+
geometry.translate(0.5, 0.5, 0.5);
|
|
333
|
+
const edges = new THREE.EdgesGeometry( geometry );
|
|
334
|
+
edgesLine = new THREE.LineSegments(edges, new THREE.LineBasicMaterial( { color } ) );
|
|
335
|
+
this.group.add( edgesLine );
|
|
336
|
+
} else {
|
|
337
|
+
edgesLine.material.color = color;
|
|
338
|
+
}
|
|
339
|
+
edgesLine.visible = true;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
this.hideEdges = () => {
|
|
343
|
+
if (edgesLine) {
|
|
344
|
+
edgesLine.visible = false;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
323
347
|
}
|
|
324
348
|
|
|
325
349
|
TextureSlides.prototype = Object.create((require('./texturePrimitive').TexturePrimitive).prototype);
|
|
@@ -78,8 +78,9 @@ const TextureArray = function () {
|
|
|
78
78
|
if (options) {
|
|
79
79
|
if (options.vs && options.fs) {
|
|
80
80
|
let transparent = true;
|
|
81
|
-
if (options
|
|
81
|
+
if ("transparent" in options) {
|
|
82
82
|
transparent = options.transparent;
|
|
83
|
+
}
|
|
83
84
|
let side = THREE.FrontSide;
|
|
84
85
|
if (options.side)
|
|
85
86
|
side = options.side;
|