Compare commits

..

No commits in common. "929360cd3062f624d4a85e135c4a28f4575c9dfb" and "0f4436787c19fa9d3f73d54afc1e5e06d6d652df" have entirely different histories.

6 changed files with 17 additions and 211 deletions

View file

@ -1 +0,0 @@
/nix/store/gnnangzf73g2b665rmhwblqydx18hjlm-pre-commit-config.json

86
flake.lock generated
View file

@ -44,43 +44,6 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"mkElmDerivation": {
"inputs": {
"elm-spa": "elm-spa",
@ -88,11 +51,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1737854574,
"narHash": "sha256-GIh8IAIjJ3BkqSKifdXcnrkJgY4diipcMZ1itmwiFyw=",
"lastModified": 1737249952,
"narHash": "sha256-bWOrcJUIW5q9BEmdeaE5XPnHiWuhujeFM23EweNMuO0=",
"owner": "jeslie0",
"repo": "mkElmDerivation",
"rev": "88b3923af364826b39428aff3431857a2b9d8699",
"rev": "dd8538d8bcddcb7245cfdffffdf8118b0013dc64",
"type": "github"
},
"original": {
@ -119,11 +82,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1738142207,
"narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=",
"lastModified": 1737632463,
"narHash": "sha256-38J9QfeGSej341ouwzqf77WIHAScihAKCt8PQJ+NH28=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9d3ae807ebd2981d593cddd0080856873139aa40",
"rev": "0aa475546ed21629c4f5bbf90e38c846a99ec9e9",
"type": "github"
},
"original": {
@ -133,22 +96,6 @@
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1730768919,
"narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"npm-fix": {
"inputs": {
"nixpkgs": [
@ -187,31 +134,10 @@
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1737465171,
"narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"mkElmDerivation": "mkElmDerivation",
"nixpkgs": "nixpkgs_2",
"pre-commit-hooks": "pre-commit-hooks",
"utils": "utils"
}
},

View file

@ -5,7 +5,6 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
mkElmDerivation.url = "github:jeslie0/mkElmDerivation";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
};
outputs =
@ -14,7 +13,6 @@
nixpkgs,
utils,
mkElmDerivation,
pre-commit-hooks,
}:
utils.lib.eachDefaultSystem (
system:
@ -28,13 +26,10 @@
devShells.default =
with pkgs;
mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages ++ [
buildInputs = [
elmPackages.elm
elmPackages.elm-test
elmPackages.elm-format
elmPackages.elm-review
entr
];
};
@ -55,18 +50,6 @@
};
};
checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt-rfc-style.enable = true;
elm-format.enable = true;
# elm-review.enable = true;
# elm-test.enable = true;
};
};
};
formatter = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
}
);

View file

@ -1,41 +0,0 @@
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/core": "1.0.5",
"elm/json": "1.1.3",
"elm/project-metadata-utils": "1.0.2",
"jfmengels/elm-review": "2.14.1",
"jfmengels/elm-review-code-style": "1.2.0",
"jfmengels/elm-review-common": "1.3.3",
"jfmengels/elm-review-debug": "1.0.8",
"jfmengels/elm-review-documentation": "2.0.4",
"jfmengels/elm-review-simplify": "2.1.6",
"jfmengels/elm-review-unused": "1.2.3",
"stil4m/elm-syntax": "7.3.8"
},
"indirect": {
"elm/bytes": "1.0.8",
"elm/html": "1.0.0",
"elm/parser": "1.1.0",
"elm/random": "1.0.0",
"elm/regex": "1.0.0",
"elm/time": "1.0.0",
"elm/virtual-dom": "1.0.3",
"elm-explorations/test": "2.2.0",
"pzp1997/assoc-list": "1.0.0",
"rtfeldman/elm-hex": "1.0.0",
"stil4m/structured-writer": "1.0.3"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "2.2.0"
},
"indirect": {}
}
}

View file

@ -1,57 +0,0 @@
module ReviewConfig exposing (config)
{-| Do not rename the ReviewConfig module or the config function, because
`elm-review` will look for these.
To add packages that contain rules, add them to this review project using
`elm install author/packagename`
when inside the directory containing this file.
-}
import Docs.ReviewAtDocs
import NoConfusingPrefixOperator
import NoDebug.Log
import NoDebug.TodoOrToString
import NoExposingEverything
import NoImportingEverything
import NoMissingTypeAnnotation
import NoMissingTypeAnnotationInLetIn
import NoMissingTypeExpose
import NoPrematureLetComputation
import NoSimpleLetBody
import NoUnused.CustomTypeConstructorArgs
import NoUnused.CustomTypeConstructors
import NoUnused.Dependencies
import NoUnused.Exports
import NoUnused.Parameters
import NoUnused.Patterns
import NoUnused.Variables
import Review.Rule as Rule exposing (Rule)
import Simplify
config : List Rule
config =
[ Docs.ReviewAtDocs.rule
, NoConfusingPrefixOperator.rule
, NoDebug.Log.rule
, NoDebug.TodoOrToString.rule
|> Rule.ignoreErrorsForDirectories [ "tests/" ]
, NoExposingEverything.rule
, NoMissingTypeAnnotation.rule
, NoMissingTypeAnnotationInLetIn.rule
, NoMissingTypeExpose.rule
, NoSimpleLetBody.rule
, NoPrematureLetComputation.rule
, NoUnused.CustomTypeConstructors.rule []
, NoUnused.CustomTypeConstructorArgs.rule
, NoUnused.Dependencies.rule
, NoUnused.Exports.rule
, NoUnused.Parameters.rule
, NoUnused.Patterns.rule
, NoUnused.Variables.rule
, Simplify.rule Simplify.defaults
]

View file

@ -1,4 +1,4 @@
module Main exposing (Flags, Model, Msg, Object3d, main)
module Main exposing (main)
import Angle
import Array
@ -11,7 +11,7 @@ import Element exposing (..)
import Element.Background as Background
import Element.Font as Font
import Html exposing (Html)
import Http
import Http exposing (Error)
import Length
import Obj.Decode
import Pixels
@ -61,6 +61,11 @@ animatedEl =
animatedUi Element.el
animatedCol : Animation -> List (Element.Attribute msg) -> List (Element msg) -> Element msg
animatedCol =
animatedUi Element.column
main : Program Flags Model Msg
main =
Browser.document { init = init, update = update, subscriptions = subscribe, view = view }
@ -76,11 +81,9 @@ type alias Flags =
init : Flags -> ( Model, Cmd Msg )
init flags =
let
( width, height ) =
flags
in
( { w = width, h = height, mesh = Nothing, textures = Nothing, angle = 0 }, Cmd.batch [ getMesh, getTexture ] )
case flags of
( width, height ) ->
( { w = width, h = height, mesh = Nothing, textures = Nothing, angle = 0 }, Cmd.batch [ getMesh, getTexture ] )
@ -233,29 +236,23 @@ pyramidMesh : Mesh.Uniform coordinates
pyramidMesh =
let
-- Define the vertices of our pyramid
frontLeft : Point3d Length.Meters coordinates
frontLeft =
Point3d.centimeters 250 500 0
frontRight : Point3d Length.Meters coordinates
frontRight =
Point3d.centimeters 400 0 -500
backLeft : Point3d Length.Meters coordinates
backLeft =
Point3d.centimeters -250 500 -500
backRight : Point3d Length.Meters coordinates
backRight =
Point3d.centimeters -250 0 0
tip : Point3d Length.Meters coordinates
tip =
Point3d.centimeters 0 0 500
-- Create a TriangularMesh value from an array of vertices and list
-- of index triples defining faces (see https://package.elm-lang.org/packages/ianmackenzie/elm-triangular-mesh/latest/TriangularMesh#indexed)
triangularMesh : TriangularMesh (Point3d Length.Meters coordinates)
triangularMesh =
TriangularMesh.indexed
(Array.fromList
@ -305,7 +302,6 @@ view3D model =
{ focalPoint = Point3d.origin
, eyePoint =
let
theta : Angle.Angle
theta =
Angle.degrees model.angle
in