Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
feat(core): update three 0.140
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed May 4, 2022
1 parent 397843e commit 25d6a51
Show file tree
Hide file tree
Showing 17 changed files with 107 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ export class NgtMeshBasicMaterial extends NgtCommonMaterial<
}

@Input() set lightMapIntensity(lightMapIntensity: NumberInput) {
this.set({
lightMapIntensity: coerceNumberProperty(lightMapIntensity),
});
this.set({ lightMapIntensity: coerceNumberProperty(lightMapIntensity) });
}

@Input() set aoMap(aoMap: THREE.Texture | null) {
Expand All @@ -61,6 +59,10 @@ export class NgtMeshBasicMaterial extends NgtCommonMaterial<
this.set({ alphaMap });
}

@Input() set fog(fog: BooleanInput) {
this.set({ fog: coerceBooleanProperty(fog) });
}

@Input() set envMap(envMap: THREE.Texture | null) {
this.set({ envMap });
}
Expand All @@ -82,9 +84,7 @@ export class NgtMeshBasicMaterial extends NgtCommonMaterial<
}

@Input() set wireframeLinewidth(wireframeLinewidth: NumberInput) {
this.set({
wireframeLinewidth: coerceNumberProperty(wireframeLinewidth),
});
this.set({ wireframeLinewidth: coerceNumberProperty(wireframeLinewidth) });
}

@Input() set wireframeLinecap(wireframeLinecap: string) {
Expand All @@ -111,6 +111,7 @@ export class NgtMeshBasicMaterial extends NgtCommonMaterial<
aoMapIntensity: true,
specularMap: true,
alphaMap: true,
fog: true,
envMap: true,
combine: true,
reflectivity: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ export class NgtMeshDepthMaterial extends NgtCommonMaterial<
}

@Input() set displacementScale(displacementScale: NumberInput) {
this.set({
displacementScale: coerceNumberProperty(displacementScale),
});
this.set({ displacementScale: coerceNumberProperty(displacementScale) });
}

@Input() set displacementBias(displacementBias: NumberInput) {
Expand All @@ -54,9 +52,7 @@ export class NgtMeshDepthMaterial extends NgtCommonMaterial<
}

@Input() set wireframeLinewidth(wireframeLinewidth: NumberInput) {
this.set({
wireframeLinewidth: coerceNumberProperty(wireframeLinewidth),
});
this.set({ wireframeLinewidth: coerceNumberProperty(wireframeLinewidth) });
}

get materialType(): AnyConstructor<THREE.MeshDepthMaterial> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ export class NgtMeshDistanceMaterial extends NgtCommonMaterial<
}

@Input() set displacementScale(displacementScale: NumberInput) {
this.set({
displacementScale: coerceNumberProperty(displacementScale),
});
this.set({ displacementScale: coerceNumberProperty(displacementScale) });
}

@Input() set displacementBias(displacementBias: NumberInput) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ export class NgtMeshLambertMaterial extends NgtCommonMaterial<
}

@Input() set emissiveIntensity(emissiveIntensity: NumberInput) {
this.set({
emissiveIntensity: coerceNumberProperty(emissiveIntensity),
});
this.set({ emissiveIntensity: coerceNumberProperty(emissiveIntensity) });
}

@Input() set emissiveMap(emissiveMap: THREE.Texture | null) {
Expand All @@ -50,9 +48,7 @@ export class NgtMeshLambertMaterial extends NgtCommonMaterial<
}

@Input() set lightMapIntensity(lightMapIntensity: NumberInput) {
this.set({
lightMapIntensity: coerceNumberProperty(lightMapIntensity),
});
this.set({ lightMapIntensity: coerceNumberProperty(lightMapIntensity) });
}

@Input() set aoMap(aoMap: THREE.Texture | null) {
Expand Down Expand Up @@ -92,9 +88,7 @@ export class NgtMeshLambertMaterial extends NgtCommonMaterial<
}

@Input() set wireframeLinewidth(wireframeLinewidth: NumberInput) {
this.set({
wireframeLinewidth: coerceNumberProperty(wireframeLinewidth),
});
this.set({ wireframeLinewidth: coerceNumberProperty(wireframeLinewidth) });
}

@Input() set wireframeLinecap(wireframeLinecap: string) {
Expand All @@ -105,6 +99,10 @@ export class NgtMeshLambertMaterial extends NgtCommonMaterial<
this.set({ wireframeLinejoin });
}

@Input() set fog(fog: BooleanInput) {
this.set({ fog: coerceBooleanProperty(fog) });
}

get materialType(): AnyConstructor<THREE.MeshLambertMaterial> {
return THREE.MeshLambertMaterial;
}
Expand All @@ -131,6 +129,7 @@ export class NgtMeshLambertMaterial extends NgtCommonMaterial<
wireframeLinewidth: true,
wireframeLinecap: true,
wireframeLinejoin: true,
fog: true,
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export class NgtMeshMatcapMaterial extends NgtCommonMaterial<
}

@Input() set displacementScale(displacementScale: NumberInput) {
this.set({
displacementScale: coerceNumberProperty(displacementScale),
});
this.set({ displacementScale: coerceNumberProperty(displacementScale) });
}

@Input() set displacementBias(displacementBias: NumberInput) {
Expand All @@ -73,6 +71,10 @@ export class NgtMeshMatcapMaterial extends NgtCommonMaterial<
this.set({ alphaMap });
}

@Input() set fog(fog: BooleanInput) {
this.set({ fog: coerceBooleanProperty(fog) });
}

@Input() set flatShading(flatShading: BooleanInput) {
this.set({ flatShading: coerceBooleanProperty(flatShading) });
}
Expand All @@ -96,6 +98,7 @@ export class NgtMeshMatcapMaterial extends NgtCommonMaterial<
displacementScale: true,
displacementBias: true,
alphaMap: true,
fog: true,
flatShading: true,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ export class NgtMeshNormalMaterial extends NgtCommonMaterial<
}

@Input() set displacementScale(displacementScale: NumberInput) {
this.set({
displacementScale: coerceNumberProperty(displacementScale),
});
this.set({ displacementScale: coerceNumberProperty(displacementScale) });
}

@Input() set displacementBias(displacementBias: NumberInput) {
Expand All @@ -62,9 +60,7 @@ export class NgtMeshNormalMaterial extends NgtCommonMaterial<
}

@Input() set wireframeLinewidth(wireframeLinewidth: NumberInput) {
this.set({
wireframeLinewidth: coerceNumberProperty(wireframeLinewidth),
});
this.set({ wireframeLinewidth: coerceNumberProperty(wireframeLinewidth) });
}

@Input() set flatShading(flatShading: BooleanInput) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ export class NgtMeshPhongMaterial extends NgtCommonMaterial<
}

@Input() set lightMapIntensity(lightMapIntensity: NumberInput) {
this.set({
lightMapIntensity: coerceNumberProperty(lightMapIntensity),
});
this.set({ lightMapIntensity: coerceNumberProperty(lightMapIntensity) });
}

@Input() set aoMap(aoMap: THREE.Texture | null) {
Expand All @@ -66,9 +64,7 @@ export class NgtMeshPhongMaterial extends NgtCommonMaterial<
}

@Input() set emissiveIntensity(emissiveIntensity: NumberInput) {
this.set({
emissiveIntensity: coerceNumberProperty(emissiveIntensity),
});
this.set({ emissiveIntensity: coerceNumberProperty(emissiveIntensity) });
}

@Input() set emissiveMap(emissiveMap: THREE.Texture | null) {
Expand Down Expand Up @@ -100,9 +96,7 @@ export class NgtMeshPhongMaterial extends NgtCommonMaterial<
}

@Input() set displacementScale(displacementScale: NumberInput) {
this.set({
displacementScale: coerceNumberProperty(displacementScale),
});
this.set({ displacementScale: coerceNumberProperty(displacementScale) });
}

@Input() set displacementBias(displacementBias: NumberInput) {
Expand Down Expand Up @@ -138,9 +132,7 @@ export class NgtMeshPhongMaterial extends NgtCommonMaterial<
}

@Input() set wireframeLinewidth(wireframeLinewidth: NumberInput) {
this.set({
wireframeLinewidth: coerceNumberProperty(wireframeLinewidth),
});
this.set({ wireframeLinewidth: coerceNumberProperty(wireframeLinewidth) });
}

@Input() set wireframeLinecap(wireframeLinecap: string) {
Expand All @@ -151,6 +143,10 @@ export class NgtMeshPhongMaterial extends NgtCommonMaterial<
this.set({ wireframeLinejoin });
}

@Input() set fog(fog: BooleanInput) {
this.set({ fog: coerceBooleanProperty(fog) });
}

@Input() set flatShading(flatShading: BooleanInput) {
this.set({ flatShading: coerceBooleanProperty(flatShading) });
}
Expand Down Expand Up @@ -192,6 +188,7 @@ export class NgtMeshPhongMaterial extends NgtCommonMaterial<
wireframeLinewidth: true,
wireframeLinecap: true,
wireframeLinejoin: true,
fog: true,
flatShading: true,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export class NgtMeshPhysicalMaterial extends NgtMeshStandardMaterial<
}

@Input() set clearcoatRoughness(clearcoatRoughness: NumberInput) {
this.set({
clearcoatRoughness: coerceNumberProperty(clearcoatRoughness),
});
this.set({ clearcoatRoughness: coerceNumberProperty(clearcoatRoughness) });
}

@Input() set clearcoatRoughnessMap(clearcoatRoughnessMap: THREE.Texture | null) {
Expand Down Expand Up @@ -77,19 +75,15 @@ export class NgtMeshPhysicalMaterial extends NgtMeshStandardMaterial<
}

@Input() set attenuationDistance(attenuationDistance: NumberInput) {
this.set({
attenuationDistance: coerceNumberProperty(attenuationDistance),
});
this.set({ attenuationDistance: coerceNumberProperty(attenuationDistance) });
}

@Input() set attenuationColor(attenuationColor: THREE.Color) {
this.set({ attenuationColor });
}

@Input() set specularIntensity(specularIntensity: NumberInput) {
this.set({
specularIntensity: coerceNumberProperty(specularIntensity),
});
this.set({ specularIntensity: coerceNumberProperty(specularIntensity) });
}

@Input() set specularColor(specularColor: THREE.Color) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ export class NgtMeshStandardMaterial<
}

@Input() set lightMapIntensity(lightMapIntensity: NumberInput) {
this.set({
lightMapIntensity: coerceNumberProperty(lightMapIntensity),
});
this.set({ lightMapIntensity: coerceNumberProperty(lightMapIntensity) });
}

@Input() set aoMap(aoMap: THREE.Texture | null) {
Expand All @@ -62,9 +60,7 @@ export class NgtMeshStandardMaterial<
}

@Input() set emissiveIntensity(emissiveIntensity: NumberInput) {
this.set({
emissiveIntensity: coerceNumberProperty(emissiveIntensity),
});
this.set({ emissiveIntensity: coerceNumberProperty(emissiveIntensity) });
}

@Input() set emissiveMap(emissiveMap: THREE.Texture | null) {
Expand Down Expand Up @@ -96,9 +92,7 @@ export class NgtMeshStandardMaterial<
}

@Input() set displacementScale(displacementScale: NumberInput) {
this.set({
displacementScale: coerceNumberProperty(displacementScale),
});
this.set({ displacementScale: coerceNumberProperty(displacementScale) });
}

@Input() set displacementBias(displacementBias: NumberInput) {
Expand Down Expand Up @@ -130,9 +124,11 @@ export class NgtMeshStandardMaterial<
}

@Input() set wireframeLinewidth(wireframeLinewidth: NumberInput) {
this.set({
wireframeLinewidth: coerceNumberProperty(wireframeLinewidth),
});
this.set({ wireframeLinewidth: coerceNumberProperty(wireframeLinewidth) });
}

@Input() set fog(fog: BooleanInput) {
this.set({ fog: coerceBooleanProperty(fog) });
}

@Input() set flatShading(flatShading: BooleanInput) {
Expand Down Expand Up @@ -172,6 +168,7 @@ export class NgtMeshStandardMaterial<
envMapIntensity: true,
wireframe: true,
wireframeLinewidth: true,
fog: true,
flatShading: true,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export class NgtMeshToonMaterial extends NgtCommonMaterial<THREE.MeshToonMateria
}

@Input() set lightMapIntensity(lightMapIntensity: NumberInput) {
this.set({
lightMapIntensity: coerceNumberProperty(lightMapIntensity),
});
this.set({ lightMapIntensity: coerceNumberProperty(lightMapIntensity) });
}

@Input() set aoMap(aoMap: THREE.Texture | null) {
Expand All @@ -59,9 +57,7 @@ export class NgtMeshToonMaterial extends NgtCommonMaterial<THREE.MeshToonMateria
}

@Input() set emissiveIntensity(emissiveIntensity: NumberInput) {
this.set({
emissiveIntensity: coerceNumberProperty(emissiveIntensity),
});
this.set({ emissiveIntensity: coerceNumberProperty(emissiveIntensity) });
}

@Input() set emissiveMap(emissiveMap: THREE.Texture | null) {
Expand Down Expand Up @@ -93,9 +89,7 @@ export class NgtMeshToonMaterial extends NgtCommonMaterial<THREE.MeshToonMateria
}

@Input() set displacementScale(displacementScale: NumberInput) {
this.set({
displacementScale: coerceNumberProperty(displacementScale),
});
this.set({ displacementScale: coerceNumberProperty(displacementScale) });
}

@Input() set displacementBias(displacementBias: NumberInput) {
Expand All @@ -111,9 +105,7 @@ export class NgtMeshToonMaterial extends NgtCommonMaterial<THREE.MeshToonMateria
}

@Input() set wireframeLinewidth(wireframeLinewidth: NumberInput) {
this.set({
wireframeLinewidth: coerceNumberProperty(wireframeLinewidth),
});
this.set({ wireframeLinewidth: coerceNumberProperty(wireframeLinewidth) });
}

@Input() set wireframeLinecap(wireframeLinecap: string) {
Expand All @@ -124,6 +116,10 @@ export class NgtMeshToonMaterial extends NgtCommonMaterial<THREE.MeshToonMateria
this.set({ wireframeLinejoin });
}

@Input() set fog(fog: BooleanInput) {
this.set({ fog: coerceBooleanProperty(fog) });
}

get materialType(): AnyConstructor<THREE.MeshToonMaterial> {
return THREE.MeshToonMaterial;
}
Expand Down Expand Up @@ -155,6 +151,7 @@ export class NgtMeshToonMaterial extends NgtCommonMaterial<THREE.MeshToonMateria
wireframeLinewidth: true,
wireframeLinecap: true,
wireframeLinejoin: true,
fog: true,
};
}
}
Expand Down
Loading

0 comments on commit 25d6a51

Please sign in to comment.