Added more dice
@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { Flex, IconButton } from "theme-ui";
|
||||
|
||||
import SunsetDice from "../../../dice/sunset/SunsetDice";
|
||||
import SunsetDice from "../../../dice/galaxy/GalaxyDice";
|
||||
|
||||
import D20Icon from "../../../icons/D20Icon";
|
||||
import D12Icon from "../../../icons/D12Icon";
|
||||
|
@ -161,8 +161,8 @@ function DiceTray({ isOpen }) {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
width: "275px",
|
||||
height: "550px",
|
||||
width: "300px",
|
||||
height: "600px",
|
||||
borderRadius: "4px",
|
||||
display: isOpen ? "block" : "none",
|
||||
position: "relative",
|
||||
|
27
src/dice/galaxy/GalaxyDice.js
Normal file
@ -0,0 +1,27 @@
|
||||
import Dice from "../Dice";
|
||||
|
||||
import albedo from "./albedo.jpg";
|
||||
import metalRoughness from "./metalRoughness.jpg";
|
||||
import normal from "./normal.jpg";
|
||||
|
||||
class GalaxyDice extends Dice {
|
||||
static meshes;
|
||||
static material;
|
||||
|
||||
static async createInstance(diceType, scene) {
|
||||
if (!this.material) {
|
||||
this.material = this.loadMaterial(
|
||||
"galaxy_pbr",
|
||||
{ albedo, metalRoughness, normal },
|
||||
scene
|
||||
);
|
||||
}
|
||||
if (!this.meshes) {
|
||||
this.meshes = await this.loadMeshes(this.material, scene);
|
||||
}
|
||||
|
||||
return Dice.createInstance(this.meshes[diceType], scene);
|
||||
}
|
||||
}
|
||||
|
||||
export default GalaxyDice;
|
BIN
src/dice/galaxy/albedo.jpg
Executable file
After Width: | Height: | Size: 2.4 MiB |
BIN
src/dice/galaxy/metalRoughness.jpg
Executable file
After Width: | Height: | Size: 1.8 MiB |
BIN
src/dice/galaxy/normal.jpg
Executable file
After Width: | Height: | Size: 285 KiB |
27
src/dice/iron/IronDice.js
Normal file
@ -0,0 +1,27 @@
|
||||
import Dice from "../Dice";
|
||||
|
||||
import albedo from "./albedo.jpg";
|
||||
import metalRoughness from "./metalRoughness.jpg";
|
||||
import normal from "./normal.jpg";
|
||||
|
||||
class IronDice extends Dice {
|
||||
static meshes;
|
||||
static material;
|
||||
|
||||
static async createInstance(diceType, scene) {
|
||||
if (!this.material) {
|
||||
this.material = this.loadMaterial(
|
||||
"iron_pbr",
|
||||
{ albedo, metalRoughness, normal },
|
||||
scene
|
||||
);
|
||||
}
|
||||
if (!this.meshes) {
|
||||
this.meshes = await this.loadMeshes(this.material, scene);
|
||||
}
|
||||
|
||||
return Dice.createInstance(this.meshes[diceType], scene);
|
||||
}
|
||||
}
|
||||
|
||||
export default IronDice;
|
BIN
src/dice/iron/albedo.jpg
Executable file
After Width: | Height: | Size: 1.0 MiB |
BIN
src/dice/iron/metalRoughness.jpg
Executable file
After Width: | Height: | Size: 1.3 MiB |
BIN
src/dice/iron/normal.jpg
Executable file
After Width: | Height: | Size: 309 KiB |
27
src/dice/nebula/NebulaDice.js
Normal file
@ -0,0 +1,27 @@
|
||||
import Dice from "../Dice";
|
||||
|
||||
import albedo from "./albedo.jpg";
|
||||
import metalRoughness from "./metalRoughness.jpg";
|
||||
import normal from "./normal.jpg";
|
||||
|
||||
class NebulaDice extends Dice {
|
||||
static meshes;
|
||||
static material;
|
||||
|
||||
static async createInstance(diceType, scene) {
|
||||
if (!this.material) {
|
||||
this.material = this.loadMaterial(
|
||||
"nebula_pbr",
|
||||
{ albedo, metalRoughness, normal },
|
||||
scene
|
||||
);
|
||||
}
|
||||
if (!this.meshes) {
|
||||
this.meshes = await this.loadMeshes(this.material, scene);
|
||||
}
|
||||
|
||||
return Dice.createInstance(this.meshes[diceType], scene);
|
||||
}
|
||||
}
|
||||
|
||||
export default NebulaDice;
|
BIN
src/dice/nebula/albedo.jpg
Executable file
After Width: | Height: | Size: 1.9 MiB |
BIN
src/dice/nebula/metalRoughness.jpg
Executable file
After Width: | Height: | Size: 1.5 MiB |
BIN
src/dice/nebula/normal.jpg
Executable file
After Width: | Height: | Size: 580 KiB |
27
src/dice/sunrise/SunriseDice.js
Normal file
@ -0,0 +1,27 @@
|
||||
import Dice from "../Dice";
|
||||
|
||||
import albedo from "./albedo.jpg";
|
||||
import metalRoughness from "./metalRoughness.jpg";
|
||||
import normal from "./normal.jpg";
|
||||
|
||||
class SunriseDice extends Dice {
|
||||
static meshes;
|
||||
static material;
|
||||
|
||||
static async createInstance(diceType, scene) {
|
||||
if (!this.material) {
|
||||
this.material = this.loadMaterial(
|
||||
"sunrise_pbr",
|
||||
{ albedo, metalRoughness, normal },
|
||||
scene
|
||||
);
|
||||
}
|
||||
if (!this.meshes) {
|
||||
this.meshes = await this.loadMeshes(this.material, scene);
|
||||
}
|
||||
|
||||
return Dice.createInstance(this.meshes[diceType], scene);
|
||||
}
|
||||
}
|
||||
|
||||
export default SunriseDice;
|
BIN
src/dice/sunrise/albedo.jpg
Executable file
After Width: | Height: | Size: 1.5 MiB |
BIN
src/dice/sunrise/metalRoughness.jpg
Executable file
After Width: | Height: | Size: 939 KiB |
BIN
src/dice/sunrise/normal.jpg
Executable file
After Width: | Height: | Size: 283 KiB |
BIN
src/dice/sunset/albedo.jpg
Normal file → Executable file
Before Width: | Height: | Size: 486 KiB After Width: | Height: | Size: 1.3 MiB |
BIN
src/dice/sunset/metalRoughness.jpg
Normal file → Executable file
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 916 KiB |
BIN
src/dice/sunset/normal.jpg
Normal file → Executable file
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 283 KiB |
27
src/dice/walnut/WalnutDice.js
Normal file
@ -0,0 +1,27 @@
|
||||
import Dice from "../Dice";
|
||||
|
||||
import albedo from "./albedo.jpg";
|
||||
import metalRoughness from "./metalRoughness.jpg";
|
||||
import normal from "./normal.jpg";
|
||||
|
||||
class WalnutDice extends Dice {
|
||||
static meshes;
|
||||
static material;
|
||||
|
||||
static async createInstance(diceType, scene) {
|
||||
if (!this.material) {
|
||||
this.material = this.loadMaterial(
|
||||
"walnut_pbr",
|
||||
{ albedo, metalRoughness, normal },
|
||||
scene
|
||||
);
|
||||
}
|
||||
if (!this.meshes) {
|
||||
this.meshes = await this.loadMeshes(this.material, scene);
|
||||
}
|
||||
|
||||
return Dice.createInstance(this.meshes[diceType], scene);
|
||||
}
|
||||
}
|
||||
|
||||
export default WalnutDice;
|
BIN
src/dice/walnut/albedo.jpg
Executable file
After Width: | Height: | Size: 2.1 MiB |
BIN
src/dice/walnut/metalRoughness.jpg
Executable file
After Width: | Height: | Size: 757 KiB |
BIN
src/dice/walnut/normal.jpg
Executable file
After Width: | Height: | Size: 1.5 MiB |